El Octavio  1.0
This is a video game about adventures.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Player Class Reference

#include <GameClass.h>

+ Collaboration diagram for Player:

Public Member Functions

 Player (Texture *texture, Vector2u imageCount, float switchTime, float speed)
 
 ~Player ()
 
void update (int row, float deltaTime, bool faceLeft)
 
void updateMovement (float deltaTime, RenderWindow &window, Sprite &adventureBgImage, Sound &soundWalk, Sound &soundJump, bool &toggle, CollisionBlock blocks[], int blocksSize)
 
void draw (RenderWindow &window)
 
void jump (float deltaTime, float jumpHeight)
 
void moveCameraFirstStage (Sprite &image, float &deltaTime)
 
void moveCharacter (int &keyTime, RenderWindow &window, Sprite &adventureBgImage, float &deltaTime)
 

Public Attributes

IntRect uvRect
 
RectangleShape body
 
float jumpY = body.getPosition().y
 
Vector2f velocity
 

Detailed Description

Definition at line 5 of file GameClass.h.

Constructor & Destructor Documentation

◆ Player()

Player::Player ( Texture texture,
Vector2u  imageCount,
float  switchTime,
float  speed 
)

Definition at line 16 of file GameClass.cpp.

+ Here is the call graph for this function:

◆ ~Player()

Player::~Player ( )

Definition at line 39 of file GameClass.cpp.

Member Function Documentation

◆ draw()

void Player::draw ( RenderWindow window)

Definition at line 299 of file GameClass.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ jump()

void Player::jump ( float  deltaTime,
float  jumpHeight 
)

Definition at line 304 of file GameClass.cpp.

+ Here is the caller graph for this function:

◆ moveCameraFirstStage()

void Player::moveCameraFirstStage ( Sprite image,
float &  deltaTime 
)

Definition at line 74 of file GameClass.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveCharacter()

void Player::moveCharacter ( int &  keyTime,
RenderWindow window,
Sprite adventureBgImage,
float &  deltaTime 
)

Definition at line 79 of file GameClass.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

void Player::update ( int  row,
float  deltaTime,
bool  faceLeft 
)

Definition at line 44 of file GameClass.cpp.

+ Here is the caller graph for this function:

◆ updateMovement()

void Player::updateMovement ( float  deltaTime,
RenderWindow window,
Sprite adventureBgImage,
Sound soundWalk,
Sound soundJump,
bool &  toggle,
CollisionBlock  blocks[],
int  blocksSize 
)

Definition at line 99 of file GameClass.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ body

RectangleShape Player::body

Definition at line 22 of file GameClass.h.

◆ jumpY

float Player::jumpY = body.getPosition().y

Definition at line 23 of file GameClass.h.

◆ uvRect

IntRect Player::uvRect

Definition at line 21 of file GameClass.h.

◆ velocity

Vector2f Player::velocity

Definition at line 24 of file GameClass.h.


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