kapman
Ghost Class Reference
#include <ghost.h>
Inheritance diagram for Ghost:
Public Types | |
enum | State { HUNTER = 0, PREY = 1, EATEN = 2 } |
Public Types inherited from Element | |
enum | Type { KAPMAN = 0, GHOST = 1, PILL = 2, ENERGYZER = 3, BONUS = 4 } |
Signals | |
void | ghostEaten (Ghost *p_ghost) |
void | lifeLost () |
void | stateChanged () |
Signals inherited from Character | |
void | eaten () |
Signals inherited from Element | |
void | moved (qreal p_x, qreal p_y) |
Public Member Functions | |
Ghost (qreal p_x, qreal p_y, const QString &p_imageId, Maze *p_maze) | |
~Ghost () | |
void | doActionOnCollision (Kapman *p_kapman) |
QString | getImageId () const |
State | getState () const |
void | initSpeedInc () |
void | setState (Ghost::State p_state) |
void | updateMove () |
void | updateMove (int p_row, int p_col) |
Public Member Functions inherited from Character | |
Character (qreal p_x, qreal p_y, Maze *p_maze) | |
~Character () | |
void | die () |
qreal | getNormalSpeed () const |
qreal | getSpeed () const |
qreal | getXSpeed () const |
qreal | getYSpeed () const |
void | increaseCharactersSpeed () |
void | initSpeed () |
bool | isInLineSight (Character *p_character) |
void | move () |
void | setXSpeed (qreal p_xSpeed) |
void | setYSpeed (qreal p_ySpeed) |
Public Member Functions inherited from Element | |
Element (qreal p_x, qreal p_y, Maze *p_maze) | |
~Element () | |
QString | getImageId () const |
int | getPoints () const |
Element::Type | getType () const |
qreal | getX () const |
qreal | getY () const |
void | initCoordinate () |
void | setImageId (const QString &p_imageId) |
void | setX (qreal p_x) |
void | setY (qreal p_y) |
Static Public Attributes | |
static const int | POINTS = 200 |
Static Public Attributes inherited from Character | |
static const qreal | HIGH_SPEED = 5.25 |
static const qreal | HIGH_SPEED_INC = 0.02 |
static const qreal | LOW_SPEED = 3.75 |
static const qreal | LOW_SPEED_INC = 0.005 |
static const qreal | MEDIUM_SPEED = 4.5 |
static const qreal | MEDIUM_SPEED_INC = 0.01 |
Additional Inherited Members | |
Protected Member Functions inherited from Character | |
Cell | getNextCell () |
void | moveOnCenter () |
bool | onCenter () |
Protected Attributes inherited from Character | |
qreal | m_maxSpeed |
qreal | m_normalSpeed |
qreal | m_speed |
qreal | m_speedIncrease |
qreal | m_xSpeed |
qreal | m_ySpeed |
Protected Attributes inherited from Element | |
QString | m_imageId |
Maze * | m_maze |
int | m_points |
Type | m_type |
qreal | m_x |
qreal | m_xInit |
qreal | m_y |
qreal | m_yInit |
Detailed Description
Member Enumeration Documentation
enum Ghost::State |
Constructor & Destructor Documentation
Ghost::Ghost | ( | qreal | p_x, |
qreal | p_y, | ||
const QString & | p_imageId, | ||
Maze * | p_maze | ||
) |
Member Function Documentation
|
virtual |
QString Ghost::getImageId | ( | ) | const |
Ghost::State Ghost::getState | ( | ) | const |
|
signal |
|
virtual |
|
signal |
Emitted when the Kapman has lost a life.
void Ghost::setState | ( | Ghost::State | p_state | ) |
|
signal |
Emitted when the Ghost has changed his state.
|
virtual |
void Ghost::updateMove | ( | int | p_row, |
int | p_col | ||
) |
Member Data Documentation
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:44:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:44:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.