From 2c1c79748ca0eb51c23c94bf876d3918ac847f8a Mon Sep 17 00:00:00 2001 From: manuel Date: Sat, 9 Apr 2011 01:25:33 +0200 Subject: fix + test --- pacman-c++/actor.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pacman-c++/actor.cpp') diff --git a/pacman-c++/actor.cpp b/pacman-c++/actor.cpp index a52be15..cd59c1e 100644 --- a/pacman-c++/actor.cpp +++ b/pacman-c++/actor.cpp @@ -47,7 +47,7 @@ Actor::Actor(Color::Color color, bool local, QGraphicsItem *parent) m_eating.append(setupEatingAnimation(Actor::Down)); /* setup player */ - connect(AudioPlayer::self(), SIGNAL(finished()), this, SLOT(enqueue())); + connect(AudioPlayer::self(), SIGNAL(aboutToFinish()), this, SLOT(enqueue())); /* make the picture showing the current direction visible */ m_images[m_direction]->setVisible(true); @@ -155,7 +155,9 @@ void Actor::move(Actor::Movement direction) if (direction == Actor::None) m_images[m_direction]->setVisible(true); else + { m_eating[direction]->start(); + } m_direction = direction; } @@ -163,7 +165,10 @@ void Actor::move(Actor::Movement direction) { m_moving->start(); if (m_local && AudioPlayer::self()->state() != Phonon::PlayingState) + { AudioPlayer::self()->play(AudioPlayer::WakaWaka); + AudioPlayer::self()->enqueue(AudioPlayer::WakaWaka); + } } } -- cgit v1.2.3