diff options
Diffstat (limited to 'pacman-c++/actor.cpp')
| -rw-r--r-- | pacman-c++/actor.cpp | 7 |
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 | ||
| 18 | Actor::Actor(Type type) | 18 | Actor::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 | ||
