diff options
Diffstat (limited to 'demos/sub-attaq/submarine_p.h')
-rw-r--r-- | demos/sub-attaq/submarine_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/demos/sub-attaq/submarine_p.h b/demos/sub-attaq/submarine_p.h index e8df877..c04b25b 100644 --- a/demos/sub-attaq/submarine_p.h +++ b/demos/sub-attaq/submarine_p.h @@ -109,7 +109,7 @@ class ReturnState : public QAnimationState public: ReturnState(SubMarine *submarine, QState *parent = 0) : QAnimationState(parent) { - returnAnimation = new QPropertyAnimation(submarine, "yRotation"); + returnAnimation = new QPropertyAnimation(submarine->rotation3d(), "angle"); AnimationManager::self()->registerAnimation(returnAnimation); setAnimation(returnAnimation); this->submarine = submarine; @@ -119,7 +119,7 @@ protected: void onEntry(QEvent *e) { returnAnimation->stop(); - returnAnimation->setStartValue(submarine->yRotation()); + returnAnimation->setStartValue(submarine->rotation3d()->angle()); returnAnimation->setEndValue(submarine->currentDirection() == SubMarine::Right ? 360. : 180.); returnAnimation->setDuration(500); QAnimationState::onEntry(e); |