Gravity Flip
|
Inherits QGraphicsView.
Public Slots | |
void | reincarnateSet (int) |
Regenerate the set. More... | |
Signals | |
void | requestFlipPlayerUpdate (Player *player) |
Send a request to flip the player. | |
void | requestFlipPlayerUpdateForPlayer1 (Player *player) |
Send a request to flip player 1. | |
void | requestFlipPlayerUpdateForPlayer2 (Player *player) |
Send a request to flip player 2. | |
Public Member Functions | |
Game (GameType type, std::vector< int > playerIDMapping, QWidget *parent=0) | |
Constructor. More... | |
void | keyPressEvent (QKeyEvent *event) |
Function called when Key press is detected. | |
void | closeEvent (QCloseEvent *event) |
Function called when X button is pressed. | |
void | startSinglePlayerGame () |
Starts a SinglePlayer Game. | |
void | startMultiPlayerGame () |
Starts a MultiPlayer Game. | |
void | connectCommonSignals () |
Connects the signals which are common to both single and multiplayer games. | |
void | connectSignalsForSinglePlayerGame () |
Connects the signals required for singleplayer game. | |
void | connectSignalsForMultiPlayerGame () |
Connects the signals required for multiplayer game. | |
Public Attributes | |
QTimer * | timer |
timer Used for updating the player position and score | |
QGraphicsScene * | scene |
scene | |
BackgroundMusic * | backgroundMusic |
Background music. | |
BackgroundUpdater * | backgroundUpdater |
Background updater Object which is called by timer to update the background. | |
NoobSet * | noobSet |
Noob Set. | |
Set1 * | set1 |
Set 1. | |
Set2 * | set2 |
Set 2. | |
GameType | gameType |
Type of the Game Can either be GAMETYPE::SINGLEPLAYER or GAMETYPE::MULTIPLAYER. | |
GameState | gameState |
State of the Game Can either be GAMESTATE::PLAYING or GAMESTATE::PAUSED or GAMESTATE::FINISHED. | |
Player * | player [2] |
Information regarding the player. | |
std::vector< int > | playerID |
Player to character Mapping Vector representing the indices of characters chosen by the user. | |
QPixmap | images [2] |
Images Image of the Player. | |
QLabel * | displayImage |
Display Image Image to be displayed near the score. | |
ScoreUpdater * | scoreUpdater |
Score Updater Object to store/update the score. | |
QThread * | threadForPlayer1 |
Thread For 1st Player Operations on the first player are performed in this thread. | |
QThread * | threadForPlayer2 |
Thread for 2nd Player Operations on the second player are performed in this thread. | |
RunPlayerWorker * | workerForPlayer1 |
Worker Object for 1st Thread Worker Function to be executed on the 1st thread. | |
RunPlayerWorker * | workerForPlayer2 |
Worker Object for 2nd Thread Worker Function to be executed on the 2nd thread. | |
QPushButton * | pauseButton |
Pause Button. | |
QPushButton * | resumeButton |
Resume Button. | |
int | xShift |
Shift in x per 10 milli seconds. | |
int | yShift |
Shift in y per 10 milli seconds. | |
Game::Game | ( | GameType | type, |
std::vector< int > | playerIDMapping, | ||
QWidget * | parent = 0 |
||
) |
Constructor.
type | Type of the game |
playerIDMapping | Vector representing the choice of characters |
parent | Pointer to Parent of this Widget |
|
slot |
Regenerate the set.
Index | of the set |