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.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/pacman-c++/actor.cpp b/pacman-c++/actor.cpp
index ab860bc..43368d6 100644
--- a/pacman-c++/actor.cpp
+++ b/pacman-c++/actor.cpp
@@ -96,16 +96,21 @@ QSequentialAnimationGroup *Actor::setupEatingAnimation(Actor::Movement direction
96 return eating; 96 return eating;
97} 97}
98 98
99Color::Color Actor::getColor() 99Color::Color Actor::color()
100{ 100{
101 return m_color; 101 return m_color;
102} 102}
103 103
104PixmapItem &Actor::getIcon() 104PixmapItem &Actor::icon()
105{ 105{
106 return m_icon; 106 return m_icon;
107} 107}
108 108
109Actor::Movement Actor::direction()
110{
111 return m_direction;
112}
113
109bool Actor::isLocal() 114bool Actor::isLocal()
110{ 115{
111 return m_local; 116 return m_local;
@@ -113,9 +118,8 @@ bool Actor::isLocal()
113 118
114void Actor::move(Actor::Movement direction) 119void Actor::move(Actor::Movement direction)
115{ 120{
116 //TODO: remove? 121 /*if (Constants::server)
117 //if (isMoving()) 122 return moveByServer(direction);*/
118 // return;
119 123
120 /* stop current animation */ 124 /* stop current animation */
121 if (direction != m_direction) 125 if (direction != m_direction)
@@ -224,3 +228,8 @@ void Actor::finishRound()
224 m_roundPoints = 0; 228 m_roundPoints = 0;
225} 229}
226 230
231void Actor::moveByServer(Actor::Movement direction)
232{
233 qDebug() << "move by server";
234 m_direction = direction;
235}