diff options
Diffstat (limited to 'examples/statemachine/errorstate/tankitem.cpp')
-rw-r--r-- | examples/statemachine/errorstate/tankitem.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/statemachine/errorstate/tankitem.cpp b/examples/statemachine/errorstate/tankitem.cpp index 705623c..ae338fe 100644 --- a/examples/statemachine/errorstate/tankitem.cpp +++ b/examples/statemachine/errorstate/tankitem.cpp @@ -86,9 +86,9 @@ private: }; TankItem::TankItem(QObject *parent) - : Tank(parent), m_currentAction(0), m_currentDirection(0.0), m_enabled(true) + : GameItem(parent), m_currentAction(0), m_currentDirection(0.0), m_enabled(true) { - connect(this, SIGNAL(fireCannon()), this, SIGNAL(actionCompleted())); + connect(this, SIGNAL(cannonFired()), this, SIGNAL(actionCompleted())); } void TankItem::idle(qreal elapsed) @@ -121,6 +121,11 @@ void TankItem::setAction(Action *newAction) m_currentAction = newAction; } +void TankItem::fireCannon() +{ + emit cannonFired(); +} + void TankItem::moveForwards(qreal length) { setAction(new MoveAction(this, length)); |