El Octavio  1.0
This is a video game about adventures.
GameClass.h
Go to the documentation of this file.
1#pragma once
2#include "Precompile.h"
4
5class Player {
6private:
7
8 // build variables
9 float totalTime;
10 float switchTime;
11 Vector2u imageCount;
12 Vector2u currentImage;
13
14 // movement variables
15 unsigned int row;
16 float speed;
17 bool faceLeft;
18 bool ramped;
19
20public:
25
26 Player(Texture* texture, Vector2u imageCount, float switchTime, float speed);
27 ~Player();
28
29 // build functions
30 void update(int row, float deltaTime, bool faceLeft);
31
32 //movement functions
33 void updateMovement(float deltaTime, RenderWindow& window, Sprite& adventureBgImage, Sound& soundWalk, Sound& soundJump, bool& toggle, CollisionBlock blocks[], int blocksSize);
34 void draw(RenderWindow& window);
35 void jump(float deltaTime, float jumpHeight);
36 void moveCameraFirstStage(Sprite& image, float& deltaTime);
38};
void moveCharacter(int &keyTime, RenderWindow &window, Sprite &adventureBgImage, float &deltaTime)
Definition: GameClass.cpp:79
RectangleShape body
Definition: GameClass.h:22
void jump(float deltaTime, float jumpHeight)
Definition: GameClass.cpp:304
void updateMovement(float deltaTime, RenderWindow &window, Sprite &adventureBgImage, Sound &soundWalk, Sound &soundJump, bool &toggle, CollisionBlock blocks[], int blocksSize)
Definition: GameClass.cpp:99
float jumpY
Definition: GameClass.h:23
void draw(RenderWindow &window)
Definition: GameClass.cpp:299
IntRect uvRect
Definition: GameClass.h:21
~Player()
Definition: GameClass.cpp:39
void update(int row, float deltaTime, bool faceLeft)
Definition: GameClass.cpp:44
void moveCameraFirstStage(Sprite &image, float &deltaTime)
Definition: GameClass.cpp:74
Vector2f velocity
Definition: GameClass.h:24
Player(Texture *texture, Vector2u imageCount, float switchTime, float speed)
Definition: GameClass.cpp:16
Specialized shape representing a rectangle.
Window that can serve as a target for 2D drawing.
Regular sound that can be played in the audio environment.
Definition: Sound.hpp:46
Drawable representation of a texture, with its own transformations, color, etc.
Definition: Sprite.hpp:48
Image living on the graphics card that can be used for drawing.
Definition: Texture.hpp:49
const Vector2f & getPosition() const
get the position of the object
T y
Y coordinate of the vector.
Definition: Vector2.hpp:76
CollisionBlock blocks[2]
Texture texture
Definition: Menu.cpp:17
int keyTime
Definition: GameClass.cpp:10