From f3f2cc63376019aaf9e8dd807ab674f92908123c Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 4 Apr 2011 18:52:02 +0200 Subject: adding sound --- pacman-c++/actor.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pacman-c++/actor.cpp') diff --git a/pacman-c++/actor.cpp b/pacman-c++/actor.cpp index 4704ed1..5f668fc 100644 --- a/pacman-c++/actor.cpp +++ b/pacman-c++/actor.cpp @@ -15,11 +15,12 @@ static QVariant myBooleanInterpolator(const bool &start, const bool &end, qreal return (progress == 1.0) ? end : start; } -Actor::Actor(Type type) - : m_type(type), m_direction(Actor::None) +Actor::Actor(Type type, QGraphicsItem *parent) + : PixmapItem(parent), m_type(type), m_direction(Actor::None) { m_pix = ":/" + QString("actor%1").arg(m_type); - setSprite(82, 82, SPRITE_PLAYER_WIDTH, SPRITE_PLAYER_HEIGHT); + // DON'T set any pixmap here. we've a pixmap in the animation + //setPixmap(m_pix); // higher player "over" lower player setZValue(m_type * 10); -- cgit v1.2.3