Gem Illuminator
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
Signals | Public Member Functions | Protected Attributes | List of all members
GameLostRay Class Reference

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>

Inheritance diagram for GameLostRay:
LightRay

Signals

void gameLost ()
 The gameLost() signal is emitted at that moment the ray detects the player leaving the scene. More...
 
- Signals inherited from LightRay
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...
 
- Public Member Functions inherited from LightRay
 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
 
- Protected Attributes inherited from LightRay
AbstractGemm_collidingGem
 
LightRayDatam_data
 
QList< LightRay * > * m_successors
 
LightRaym_selectedSuccessor
 
bool m_isStatic
 
Playerm_player
 
Scenem_scene
 

Additional Inherited Members

- Public Slots inherited from LightRay
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)
 
Playerplayer () const
 
void setPlayer (Player *attachedPlayer)
 
Scenescene () const
 
void setScene (Scene *owningScene)
 
bool isStatic () const
 
void setStatic ()
 
LightRayselectedSuccessor ()
 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 ()
 
- Protected Member Functions inherited from LightRay
bool isPlayerBeforeCollisionPoint ()
 
void calculateSuccessors ()
 
AbstractGemcollidingGem () const
 
void setCollidingGem (AbstractGem *gem)
 

Detailed Description

The GameLostRay class is a specialized LightRay, that is created if the player should lose as soon as the player reaches it.

Constructor & Destructor Documentation

GameLostRay::GameLostRay ( QObject *  parent = 0)
explicit

Member Function Documentation

void GameLostRay::gameLost ( )
signal

The gameLost() signal is emitted at that moment the ray detects the player leaving the scene.

void GameLostRay::update ( int  timeDifference)
overridevirtual

This method is like LightRay::update() with the addition, that the game end is detected a soon as the ray has a player.

Parameters
timeDifferenceTime difference to previous update.

Reimplemented from LightRay.

Member Data Documentation

bool GameLostRay::m_alreadyLost
protected

The documentation for this class was generated from the following files: