summaryrefslogtreecommitdiffstats
path: root/examples/statemachine/errorstate/tankitem.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/statemachine/errorstate/tankitem.h')
-rw-r--r--examples/statemachine/errorstate/tankitem.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/statemachine/errorstate/tankitem.h b/examples/statemachine/errorstate/tankitem.h
index 45016ec..cefed69 100644
--- a/examples/statemachine/errorstate/tankitem.h
+++ b/examples/statemachine/errorstate/tankitem.h
@@ -10,7 +10,7 @@ class TankItem: public GameItem
{
Q_OBJECT
Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
- Q_PROPERTY(qreal direction READ direction WRITE turn)
+ Q_PROPERTY(qreal direction READ direction WRITE turnTo)
Q_PROPERTY(qreal distanceToObstacle READ distanceToObstacle)
public:
TankItem(QObject *parent = 0);
@@ -42,9 +42,10 @@ signals:
void cannonFired();
public slots:
- void moveForwards(qreal length);
- void moveBackwards(qreal length);
- void turn(qreal newDirection);
+ void moveForwards(qreal length = 10.0);
+ void moveBackwards(qreal length = 10.0);
+ void turn(qreal degrees = 30.0);
+ void turnTo(qreal degrees = 0.0);
void stop();
void fireCannon();