arbre Etat, plus ajout animation player

This commit is contained in:
Estrela Allan p1923381
2020-05-02 16:10:48 +02:00
parent cd7f1837a4
commit c85ccf4f8f
4 changed files with 195 additions and 47 deletions

View File

@ -35,21 +35,27 @@ public:
Player p;
public:
void traitementInput(float dt);
void traitementInput();
void setPosition(int x, int y);
private:
void droit();
void gauche();
void bas();
void saut();
void dash();
void idle();
void attack();
void bigattack();
void animation();
void block();
//void droit();
//void gauche();
//void bas();
//void saut();
//void dash();
//void idle();
//void attack();
//void bigattack();
//void block();
void PlayerLogic(float dt);
void PlayerLogic_OnGround(float dt);
void PlayerLogic_Jump(float dt);
void PlayerLogic_FreeFall(float dt);
public:
const float speed = 100.f;
float pv = 100;
@ -60,10 +66,22 @@ public:
bool on_roof = false;
bool on_left_wall = false;
bool on_right_wall = false;
bool right;
bool left;
bool jump;
struct S_PlayerState
{
bool right;
bool left;
bool jump;
bool dash;
bool idle;
bool attack;
bool bigattack;
bool block;
bool freefall;
} playerState;
private:
Vector2 velocity;