Gravity Flip
Public Slots | Signals | Public Member Functions | Public Attributes | List of all members
Player Class Reference

Inherits QObject, and QGraphicsPixmapItem.

Public Slots

void runPlayer ()
 Run Player.
 
void doneProcessing (PlayerState state)
 Slot Done Processing Slot to be called after worker thread finishes processing the image.
 
void doneFlipping (PlayerState state)
 Slot Done Flipping Slot to be called after worker thread finishes flipping.
 

Signals

void requestUpdatePlayerState (Player *player, bool isNotCollidingWithTop, bool isNotCollidingWithBottom, bool isNotCollidingWithRight, int xShift, int yShift)
 Request Update to player state Requests an update to the player state.
 

Public Member Functions

 Player ()
 Constructor.
 
 Player (const Player &player)
 Constructor. More...
 
 Player (int index, QGraphicsItem *parent=0)
 Constructor. More...
 
void flipPlayer ()
 Flip Player.
 
bool isNotColliding (QGraphicsPolygonItem *area)
 Is Not Colliding. More...
 
bool isCaught ()
 Is Caught. More...
 
void killPlayer ()
 Kill Player.
 

Public Attributes

int playerIndex
 Player Index.
 
QPixmap run [8]
 Run.
 
int pixmapIndex
 PixMapIndex.
 
bool isFlipped
 Is Flipped.
 
bool isInAir
 Is In Air.
 
QGraphicsPolygonItem * topArea
 Top Area.
 
QGraphicsPolygonItem * bottomArea
 Bottom Area.
 
QGraphicsPolygonItem * rightArea
 Right Area.
 
QMediaPlayer * stepSoundPlayer
 Step Sound Player.
 

Constructor & Destructor Documentation

Player::Player ( const Player player)

Constructor.

Parameters
Referenceto Player
Player::Player ( int  index,
QGraphicsItem *  parent = 0 
)

Constructor.

Parameters
index
parent

Member Function Documentation

bool Player::isCaught ( )

Is Caught.

Returns
true if caught, false otherwise
bool Player::isNotColliding ( QGraphicsPolygonItem *  area)

Is Not Colliding.

Parameters
area

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