kapman
Energizer Class Reference
#include <energizer.h>
Inheritance diagram for Energizer:

Public Member Functions | |
| Energizer (qreal p_x, qreal p_y, Maze *p_maze, const QString &p_imageId) | |
| ~Energizer () | |
| void | doActionOnCollision (Kapman *p_kapman) |
| QString | getType () |
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 = 50 |
Additional Inherited Members | |
Public Types inherited from Element | |
| enum | Type { KAPMAN = 0, GHOST = 1, PILL = 2, ENERGYZER = 3, BONUS = 4 } |
Signals inherited from Element | |
| void | moved (qreal p_x, qreal p_y) |
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
This class represents an energizer enabling to eat Ghosts.
Definition at line 29 of file energizer.h.
Constructor & Destructor Documentation
| Energizer::Energizer | ( | qreal | p_x, |
| qreal | p_y, | ||
| Maze * | p_maze, | ||
| const QString & | p_imageId | ||
| ) |
Creates a new Energizer instance.
- Parameters
-
p_x the x-coordinate p_y the y-coordinate p_maze the Maze the Energyzer is on p_imageId the path to the Energyzer image
Definition at line 25 of file energizer.cpp.
| Energizer::~Energizer | ( | ) |
Deletes the Energizer instance.
Definition at line 31 of file energizer.cpp.
Member Function Documentation
|
virtual |
Computes an action on a collision with the Kapman.
- Parameters
-
p_kapman the instance of Kapman which collides with the Energyzer
Reimplemented from Element.
Definition at line 34 of file energizer.cpp.
| QString Energizer::getType | ( | ) |
Gets the type of the Energyzer.
- Returns
- the type of the Energyzer
Member Data Documentation
|
static |
The value of an Energyzer.
Definition at line 36 of file energizer.h.
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.
KDE API Reference
Public Member Functions inherited from