From 8135626bfe58cf605eda793122c049e8ec7ef31d Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 11 Apr 2011 14:53:08 +0200 Subject: minor movement improvements --- pacman-c++/actor.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'pacman-c++/actor.cpp') 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 return eating; } -Color::Color Actor::getColor() +Color::Color Actor::color() { return m_color; } -PixmapItem &Actor::getIcon() +PixmapItem &Actor::icon() { return m_icon; } +Actor::Movement Actor::direction() +{ + return m_direction; +} + bool Actor::isLocal() { return m_local; @@ -113,9 +118,8 @@ bool Actor::isLocal() void Actor::move(Actor::Movement direction) { - //TODO: remove? - //if (isMoving()) - // return; + /*if (Constants::server) + return moveByServer(direction);*/ /* stop current animation */ if (direction != m_direction) @@ -224,3 +228,8 @@ void Actor::finishRound() m_roundPoints = 0; } +void Actor::moveByServer(Actor::Movement direction) +{ + qDebug() << "move by server"; + m_direction = direction; +} -- cgit v1.2.3