summaryrefslogtreecommitdiffstats
path: root/pacman-c++/actor.cpp
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2011-04-04 18:52:02 +0200
committermanuel <manuel@mausz.at>2011-04-04 18:52:02 +0200
commitf3f2cc63376019aaf9e8dd807ab674f92908123c (patch)
tree0539cbfdd4449dd77a5fe8f1af192929e50ae5b5 /pacman-c++/actor.cpp
parentb310b66be264330e271f4929065cd61f0b0d8bf4 (diff)
downloadfoop-f3f2cc63376019aaf9e8dd807ab674f92908123c.tar.gz
foop-f3f2cc63376019aaf9e8dd807ab674f92908123c.tar.bz2
foop-f3f2cc63376019aaf9e8dd807ab674f92908123c.zip
adding sound
Diffstat (limited to 'pacman-c++/actor.cpp')
-rw-r--r--pacman-c++/actor.cpp7
1 files changed, 4 insertions, 3 deletions
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
15 return (progress == 1.0) ? end : start; 15 return (progress == 1.0) ? end : start;
16} 16}
17 17
18Actor::Actor(Type type) 18Actor::Actor(Type type, QGraphicsItem *parent)
19 : m_type(type), m_direction(Actor::None) 19 : PixmapItem(parent), m_type(type), m_direction(Actor::None)
20{ 20{
21 m_pix = ":/" + QString("actor%1").arg(m_type); 21 m_pix = ":/" + QString("actor%1").arg(m_type);
22 setSprite(82, 82, SPRITE_PLAYER_WIDTH, SPRITE_PLAYER_HEIGHT); 22 // DON'T set any pixmap here. we've a pixmap in the animation
23 //setPixmap(m_pix);
23 // higher player "over" lower player 24 // higher player "over" lower player
24 setZValue(m_type * 10); 25 setZValue(m_type * 10);
25 26