~kubuntu-members/kapman/4.11

« back to all changes in this revision

Viewing changes to ghost.cpp

  • Committer: Pierre-Benoit Besse
  • Date: 2008-08-15 11:43:49 UTC
  • Revision ID: git-v1:89f706af55b38ee770ceb235d4dfe581e41f028c
- All images are now in a single SVG file
- Small improvments in preformances by fixing some mistakes

svn path=/trunk/playground/games/kapman/; revision=847429

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#include "ghost.h"
20
20
 
21
 
#include <KDebug>
22
21
#include <QPointF>
23
22
 
24
23
#include <cstdlib>
30
29
qreal Ghost::s_speed = Character::s_speed;
31
30
qreal Ghost::s_speedIncrease = Ghost::MEDIUM_SPEED_INC;
32
31
 
33
 
Ghost::Ghost(qreal p_x, qreal p_y, const QString & p_imageURL, Maze* p_maze) : Character(p_x, p_y, p_maze) {
 
32
Ghost::Ghost(qreal p_x, qreal p_y, const QString & p_imageId, Maze* p_maze) : Character(p_x, p_y, p_maze) {
34
33
        // Initialize the ghost attributes
35
 
        m_imageURL = p_imageURL;
 
34
        m_imageId = p_imageId;
36
35
        m_points = 200;
37
36
        m_type = Element::GHOST;
38
37
        m_state = Ghost::HUNTER;
193
192
        move();
194
193
}
195
194
 
196
 
QString Ghost::getImageURL() const  {
197
 
        return m_imageURL;
 
195
QString Ghost::getImageId() const  {
 
196
        return m_imageId;
198
197
}
199
198
 
200
199
Ghost::State Ghost::getState() const {