/
Player.h
54 lines (42 loc) · 1.16 KB
/
Player.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef PLAYER_H
#define PLAYER_H
#include "ObjectInGame.h"
#include "Plataforma.h"
class Player: public ObjectInGame
{
public:
Player();
virtual ~Player();
void looseLife();
void setLife(int _life);
int getLife();
void fly();
void looseFeather();
void looseFlyingCounter();
void setFlyingCounter(int _flyingcounter);
int getFlyingCounter();
void setDead(bool _dead);
bool getDead();
void setFall(bool _fall);
bool getFall();
void setJumping(bool _jumping);
bool getJumping();
void setFlying(bool _Flying);
bool getFlying();
void jump();
void setHoldJump(bool hold);
bool getHoldJump();
void setJumpTimer();
float getJumpTimer();
float getJumpDuration();
void colidePlataforma(Plataforma& visado);
void calcSpriteSpeed();
void update();
void draw();
protected:
private:
int life, flyingCounter;
bool dead, fall, jumping, flying, holdJump;
float jumpDuration, jumpTimer, spriteRun,spriteCount;
};
#endif // PLAYER_H