granatier
Public Slots |
Signals |
Public Member Functions |
Protected Member Functions |
Protected Attributes |
List of all members
Bomb Class Reference
#include <bomb.h>
Inheritance diagram for Bomb:

Public Slots | |
| void | detonate () |
| void | slot_detonationCompleted () |
| void | updateMortarState () |
Signals | |
| void | bombDetonated (Bomb *bomb) |
| void | falling () |
| void | mortar (int nMortarState, int nMortarRampEnd, int nMortarPeak, int nMortarGround) |
| void | releaseBombArmory () |
Signals inherited from Element | |
| void | moved (qreal p_x, qreal p_y) |
Public Member Functions | |
| Bomb (qreal fX, qreal fY, Arena *p_arena, int nBombID, int nDetonationCountdown) | |
| ~Bomb () | |
| int | bombPower () |
| int | explosionID () |
| qreal | getSpeed () |
| qreal | getXSpeed () const |
| qreal | getYSpeed () const |
| void | goDown () |
| void | goLeft () |
| void | goRight () |
| void | goUp () |
| void | initDetonation (int nBombID, int nDetonationTimeout) |
| bool | isDetonated () |
| void | move (qreal x, qreal y) |
| void | pause () |
| void | resume () |
| void | setBombPower (int bombPower) |
| void | setKicked (int nDirection) |
| void | setThrown (int nDirection) |
| void | setXSpeed (qreal p_xSpeed) |
| void | setYSpeed (qreal p_ySpeed) |
| void | updateMove () |
Public Member Functions inherited from Element | |
| Element (qreal p_x, qreal p_y, Arena *p_arena) | |
| ~Element () | |
| virtual void | doActionOnCollision (Player *p_player) |
| QString | getImageId () const |
| Granatier::Element::Type | getType () const |
| qreal | getX () const |
| qreal | getY () const |
| void | initCoordinate () |
| void | setArena (Arena *p_arena) |
| void | setImageId (const QString &p_imageId) |
| void | setInitialCoordinates (qreal p_x, qreal p_y) |
| void | setX (qreal p_x) |
| void | setY (qreal p_y) |
Protected Member Functions | |
| void | moveOnCenter () |
| bool | onCenter () |
Protected Attributes | |
| int | m_bombID |
| int | m_bombPower |
| bool | m_detonated |
| QTimer * | m_detonationCountdownTimer |
| int | m_explosionID |
| bool | m_falling |
| int | m_mortarState |
| QTimer * | m_mortarTimer |
| qreal | m_speed |
| bool | m_stopOnCenter |
| bool | m_thrown |
| qreal | m_xSpeed |
| qreal | m_ySpeed |
Protected Attributes inherited from Element | |
| Arena * | m_arena |
| QString | m_imageId |
| Granatier::Element::Type | m_type |
| qreal | m_x |
| qreal | m_xInit |
| qreal | m_y |
| qreal | m_yInit |
Detailed Description
This class describes the common characteristics and behaviour of the bomb item.
Constructor & Destructor Documentation
| Bomb::Bomb | ( | qreal | fX, |
| qreal | fY, | ||
| Arena * | p_arena, | ||
| int | nBombID, | ||
| int | nDetonationCountdown | ||
| ) |
Member Function Documentation
|
signal |
Emitted when the Bomb is exploded.
- Parameters
-
bomb this bomb
| int Bomb::bombPower | ( | ) |
|
signal |
Emitted when the bomb is falling in a hole.
| qreal Bomb::getSpeed | ( | ) |
| qreal Bomb::getXSpeed | ( | ) | const |
| qreal Bomb::getYSpeed | ( | ) | const |
| void Bomb::initDetonation | ( | int | nBombID, |
| int | nDetonationTimeout | ||
| ) |
| bool Bomb::isDetonated | ( | ) |
|
signal |
Emitted when the Bomb is thrown by the mortar or by the player.
- Parameters
-
nState the current state of the mortar
| void Bomb::move | ( | qreal | x, |
| qreal | y | ||
| ) |
|
protected |
|
protected |
|
signal |
Emitted to refill the player bomb armory.
| void Bomb::setBombPower | ( | int | bombPower | ) |
| void Bomb::setKicked | ( | int | nDirection | ) |
| void Bomb::setThrown | ( | int | nDirection | ) |
| void Bomb::setXSpeed | ( | qreal | p_xSpeed | ) |
| void Bomb::setYSpeed | ( | qreal | p_ySpeed | ) |
Member Data Documentation
|
protected |
|
protected |
|
protected |
|
protected |
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:43:51 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:43:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.
KDE API Reference
Signals inherited from