From c910e2267d3af30f10b9c659b2d9f9349c596e0d Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 12 Apr 2011 21:53:36 +0200 Subject: remove animationmanager (for now?) --- pacman-c++/actor.cpp | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'pacman-c++/actor.cpp') diff --git a/pacman-c++/actor.cpp b/pacman-c++/actor.cpp index 7b77851..6ca981c 100644 --- a/pacman-c++/actor.cpp +++ b/pacman-c++/actor.cpp @@ -1,5 +1,4 @@ #include "actor.h" -#include "animationmanager.h" #include #include #include @@ -122,7 +121,7 @@ void Actor::move(Actor::Movement direction) if (Constants::server) return moveByServer(direction); - /* stop current animation */ + /* stop current animation if direction changed */ if (direction != m_direction) { /* hide all pictures */ @@ -130,10 +129,7 @@ void Actor::move(Actor::Movement direction) m_images.at(i)->setVisible(false); if (m_eating[m_direction] != NULL) - { m_eating[m_direction]->stop(); - //AnimationManager::self()->unregisterAnimation(m_eating[m_direction]); - } } QPointF endpos(0, 0); @@ -165,7 +161,7 @@ void Actor::move(Actor::Movement direction) } setPos(pos() + endpos); - /* start new animation */ + /* start new animation if direction changed */ if (direction != m_direction) { if (direction == Actor::None) @@ -174,24 +170,9 @@ void Actor::move(Actor::Movement direction) m_eating[direction]->start(); } + /* start moving animation */ if (direction != Actor::None) - { - //if (m_local && m_player->isWorking() && m_player->state() != Phonon::PlayingState) - // m_player->play(); m_moving->start(); - } - else if (direction != m_direction) - { - //if (m_local && m_player->isWorking() && m_player->state() != Phonon::PausedState) - // m_player->pause(); - } - - if (direction == Actor::None) - { - //TODO - qDebug() << "pause"; - //m_wakaPlayer->pause(); - } m_direction = direction; } -- cgit v1.2.3