It is the Game Class.
More...
#include <game.h>
|
void | collision () |
| Signal emitted when the cube has a collision with an obstacle.
|
|
void | gameClosedSignal () |
| Signal emitted to close the game.
|
|
void | setMouseMovementTracking (int mode) |
| This signal is emitted to set the Qubet's Mouse Move Tracking sensibility. The modes are: 0 - no signal emitted. 1 - the signal mouseMoved is emitted only when the mouse is moved and one of the mouse buttons are clicked. 2 - the signal mouseMoved is emitted always when the mouse is moved. More...
|
|
void | keyPressedSignal (QKeyEvent *event) |
| Signal relaunched from Qubet when the user presses a key on the keyboard. More...
|
|
void | enableAudio (bool enabled) |
| Signal emitted to enable or disable the audio. More...
|
|
void | playAmbientMusic (QString filename) |
| Signal emitted to play the ambient music. More...
|
|
void | stopAmbientMusic () |
| Signal emitted to stop the current ambient music.
|
|
void | playEffect (QString effectName) |
| Signal emitted to play an effect. More...
|
|
void | setSkybox (QString skyboxName) |
| Signal emitted to set the Skybox. More...
|
|
|
| Game (QMap< GLint, GLuint > &_iconsList, Alphabet *_alphabet, Skin *_skin, QMap< GLint, Level * > &_levelsList, QObject *_parent=0, bool _audioEnabled=true, QGLShaderProgram *_explosionShader=NULL) |
| Creator for the Story Mode. More...
|
|
| Game (QMap< GLint, GLuint > &_iconsList, Alphabet *_alphabet, Skin *_skin, Level *_level, QObject *_parent=0, bool _audioEnabled=true, QGLShaderProgram *_explosionShader=NULL) |
| Cunstructor for the Arcade Mode. More...
|
|
| ~Game () |
| Safely destroy a Game Object.
|
|
void | startGame () |
| Function to start the game.
|
|
void | draw (GLboolean simplifyForPicking=false) |
| Method to draw the game. More...
|
|
|
void | itemClicked (QMouseEvent *event, QList< GLuint > listNames) |
| Slot invoked when the user clicks on a item. More...
|
|
void | mouseReleased (QMouseEvent *event) |
| Slot invoked when the user releases the mouse button. More...
|
|
void | mouseMoved (QMouseEvent *event, QList< GLuint > listNames) |
| Slot invoked when the user moves the mouse. More...
|
|
void | wheelScrolled (QWheelEvent *event) |
| Slot invoked when the user scrolls the wheel of the mouse button. More...
|
|
void | keyPressed (QKeyEvent *event) |
| Slot invoked when the user presses a key on the keyboard. More...
|
|
void | collided () |
| Slot invoked when the cube has a collision with an obstacle.
|
|
void | exploded () |
| Slot invoked when the cube has exploded (suicide or collided).
|
|
void | explosionFinished () |
| Slot invoked when the explosion has finished.
|
|
void | levelCompleted () |
| Slot invoked when level is completed.
|
|
void | hideLevelName () |
| Slot invoked to hide the Level Name.
|
|
It is the Game Class.
- Version
- 1.0
- Author
- #34
Game::Game |
( |
QMap< GLint, GLuint > & |
_iconsList, |
|
|
Alphabet * |
_alphabet, |
|
|
Skin * |
_skin, |
|
|
QMap< GLint, Level * > & |
_levelsList, |
|
|
QObject * |
_parent = 0 , |
|
|
bool |
_audioEnabled = true , |
|
|
QGLShaderProgram * |
_explosionShader = NULL |
|
) |
| |
|
explicit |
Creator for the Story Mode.
- Parameters
-
_iconsList | is the reference to Qubet's iconsList. |
_alphabet | is the reference to Qubet's alphabet. |
_skin | is the Skin. |
_levelsList | is the levelList. |
_parent | is a callback variable to the parent of the parent. |
_audioEnabled | is a variable to states if the audio is enabled or not. |
_explosionShader | is the shader for the explosion. |
Game::Game |
( |
QMap< GLint, GLuint > & |
_iconsList, |
|
|
Alphabet * |
_alphabet, |
|
|
Skin * |
_skin, |
|
|
Level * |
_level, |
|
|
QObject * |
_parent = 0 , |
|
|
bool |
_audioEnabled = true , |
|
|
QGLShaderProgram * |
_explosionShader = NULL |
|
) |
| |
|
explicit |
Cunstructor for the Arcade Mode.
- Parameters
-
_iconsList | is the reference to Qubet's iconsList. |
_alphabet | is the reference to Qubet's alphabet. |
_skin | is the Skin. |
_level | is the "going to play" Level. |
_parent | is the Game parent. |
_audioEnabled | is the audioEnabled boolean value. |
_explosionShader | is the shader for the explosion. |
void Game::draw |
( |
GLboolean |
simplifyForPicking = false | ) |
|
Method to draw the game.
- Parameters
-
simplifyForPicking | [default = false] is used to draw a simplified scene used for the picking function. |
void Game::enableAudio |
( |
bool |
enabled | ) |
|
|
signal |
Signal emitted to enable or disable the audio.
- Parameters
-
enabled | is the variable that states if the audio is to enable or not. |
void Game::itemClicked |
( |
QMouseEvent * |
event, |
|
|
QList< GLuint > |
listNames |
|
) |
| |
|
privateslot |
Slot invoked when the user clicks on a item.
- Parameters
-
event | is the QMouseEvent. |
listNames | is the QList<GLuint> of item's names. |
void Game::keyPressed |
( |
QKeyEvent * |
event | ) |
|
|
privateslot |
Slot invoked when the user presses a key on the keyboard.
- Parameters
-
void Game::keyPressedSignal |
( |
QKeyEvent * |
event | ) |
|
|
signal |
Signal relaunched from Qubet when the user presses a key on the keyboard.
- Parameters
-
void Game::mouseMoved |
( |
QMouseEvent * |
event, |
|
|
QList< GLuint > |
listNames |
|
) |
| |
|
privateslot |
Slot invoked when the user moves the mouse.
- Parameters
-
event | is the QMouseEvent*. |
listNames | is the QList<GLuint> of item's names. |
void Game::mouseReleased |
( |
QMouseEvent * |
event | ) |
|
|
privateslot |
Slot invoked when the user releases the mouse button.
- Parameters
-
event | is the QMouseEvent*. |
void Game::playAmbientMusic |
( |
QString |
filename | ) |
|
|
signal |
Signal emitted to play the ambient music.
- Parameters
-
filename | is the filename to play. |
void Game::playEffect |
( |
QString |
effectName | ) |
|
|
signal |
Signal emitted to play an effect.
- Parameters
-
effectName | is the name of the effect to play. |
void Game::setMouseMovementTracking |
( |
int |
mode | ) |
|
|
signal |
This signal is emitted to set the Qubet's Mouse Move Tracking sensibility. The modes are: 0 - no signal emitted. 1 - the signal mouseMoved is emitted only when the mouse is moved and one of the mouse buttons are clicked. 2 - the signal mouseMoved is emitted always when the mouse is moved.
- Parameters
-
mode | It is the selected mode. |
void Game::setSkybox |
( |
QString |
skyboxName | ) |
|
|
signal |
Signal emitted to set the Skybox.
- Parameters
-
skyboxName | is the name of the Skybox to apply. |
void Game::wheelScrolled |
( |
QWheelEvent * |
event | ) |
|
|
privateslot |
Slot invoked when the user scrolls the wheel of the mouse button.
- Parameters
-
event | is the QWheelEvent*. |
It is the adjective CubeStinr.
It is the alphabet provided by Qubet.
GLfloat Game::angleRotVolumeCube |
|
private |
It is the current rotation angle of the volume icon.
It is the audioEnabled boolean value.
It is the camera offset for the editor.
It is the list of the current menu steps.
It is the current level value.
It is the death counter value.
QGLShaderProgram* Game::explosionShader |
|
private |
It is the explosion Shader.
It is the game type value.
It is the starting grid Skin.
QMap<GLint,GLuint> Game::iconsList |
|
private |
It is the iconsList provided by Qubet object.
It is the parameter for the introduction.
It says if the cube is exploding.
It says if the game is paused or not.
It is the variable that states if the game is quitting.
It is the current level pointer.
It is the offset of the Level.
QMap<GLint,Level*> Game::levelsList |
|
private |
It is the story levelList.
It is a pointer to the next Level.
It is the parent of a game Object.
It is the positionController pointer.
It is the CubeString used in pause mode to back to the menu.
It is the variable that states if the game is showing results.
it is the cube skin pointer.
It is the state CubeString (used for Pause string, intro, ...).
It is the skin of the volume button.
It is the variable that sign the waiting time.
The documentation for this class was generated from the following files: