The GameLostRay class is a specialized LightRay, that is created if the player should lose as soon as the player reaches it. More...
#include <gamelostray.h>
Signals | |
void | gameLost () |
The gameLost() signal is emitted at that moment the ray detects the player leaving the scene. More... | |
![]() | |
void | colorChanged () |
void | startPositionChanged () |
void | endPositionChanged () |
void | playerChanged () |
void | sceneChanged () |
Public Member Functions | |
GameLostRay (QObject *parent=0) | |
void | update (int timeDifference) override |
This method is like LightRay::update() with the addition, that the game end is detected a soon as the ray has a player. More... | |
![]() | |
LightRay (QObject *parent=0) | |
virtual | ~LightRay () |
QVector3D | normalizedOrthogonalVector () const |
Calculates a normalized vector that is orthogonal to direction(). More... | |
QVector3D | calculateColor () |
calculateSuccessorColor calculates the successor color based on its normalized direction The color values are approximately in the range between 0.1 and 0.8 More... | |
Protected Attributes | |
bool | m_alreadyLost |
![]() | |
AbstractGem * | m_collidingGem |
LightRayData * | m_data |
QList< LightRay * > * | m_successors |
LightRay * | m_selectedSuccessor |
bool | m_isStatic |
Player * | m_player |
Scene * | m_scene |
Additional Inherited Members | |
![]() | |
const QVector3D & | startPosition () const |
void | setStartPosition (const QVector3D &position) |
const QVector3D & | endPosition () const |
void | setEndPosition (const QVector3D &position) |
const QVector3D & | direction () const |
const QVector3D & | normalizedDirection () const |
const QVector3D & | color () const |
void | setColor (const QVector3D &color) |
Player * | player () const |
void | setPlayer (Player *attachedPlayer) |
Scene * | scene () const |
void | setScene (Scene *owningScene) |
bool | isStatic () const |
void | setStatic () |
LightRay * | selectedSuccessor () |
Returns the ray the player should move on after reaching end of current ray. In case no successors exists they will be calculated using calculateSuccessors() More... | |
void | setSelectedSuccessor (LightRay *successor) |
const QList< LightRay * > & | successors () |
![]() | |
bool | isPlayerBeforeCollisionPoint () |
void | calculateSuccessors () |
AbstractGem * | collidingGem () const |
void | setCollidingGem (AbstractGem *gem) |
The GameLostRay class is a specialized LightRay, that is created if the player should lose as soon as the player reaches it.
|
explicit |
|
signal |
The gameLost() signal is emitted at that moment the ray detects the player leaving the scene.
|
overridevirtual |
This method is like LightRay::update() with the addition, that the game end is detected a soon as the ray has a player.
timeDifference | Time difference to previous update. |
Reimplemented from LightRay.
|
protected |