mirror of
https://forge.univ-lyon1.fr/tplifap4/dungeonanddeamon.git
synced 2024-02-27 13:31:50 +01:00
arbre Etat, plus ajout animation player
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user