summaryrefslogtreecommitdiffstats
path: root/pacman-c++/actor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pacman-c++/actor.cpp')
-rw-r--r--pacman-c++/actor.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/pacman-c++/actor.cpp b/pacman-c++/actor.cpp
index 1796091..b6de49c 100644
--- a/pacman-c++/actor.cpp
+++ b/pacman-c++/actor.cpp
@@ -76,6 +76,7 @@ QSequentialAnimationGroup *Actor::setupEatingAnimation(Actor::Movement direction
76 76
77 QPropertyAnimation *move = new QPropertyAnimation(img, "pos", m_moving); 77 QPropertyAnimation *move = new QPropertyAnimation(img, "pos", m_moving);
78 move->setDuration(Constants::tick); 78 move->setDuration(Constants::tick);
79 move->setEndValue(QPoint(0, 0));
79 } 80 }
80 81
81 return eating; 82 return eating;
@@ -138,12 +139,10 @@ void Actor::move(Actor::Movement direction)
138 break; 139 break;
139 } 140 }
140 141
141 qDebug() << __FILE__ << "Move from" << pos() - endpos << "to" << (pos()) << "(" << endpos << ")";
142 for(int i = 0; i < m_moving->animationCount(); ++i) 142 for(int i = 0; i < m_moving->animationCount(); ++i)
143 { 143 {
144 QPropertyAnimation *move = dynamic_cast<QPropertyAnimation *>(m_moving->animationAt(i)); 144 QPropertyAnimation *move = dynamic_cast<QPropertyAnimation *>(m_moving->animationAt(i));
145 move->setStartValue(QPoint(0, 0) - endpos); 145 move->setStartValue(QPoint(0, 0) - endpos);
146 move->setEndValue(QPoint(0, 0));
147 } 146 }
148 setPos(pos() + endpos); 147 setPos(pos() + endpos);
149 148