|
|
|
@ -10,15 +10,8 @@ |
|
|
|
|
|
|
|
|
|
struct Player{ |
|
|
|
|
friend class Crawler; |
|
|
|
|
friend class Warrior; |
|
|
|
|
friend class Thief; |
|
|
|
|
friend class Ranger; |
|
|
|
|
friend class Bard; |
|
|
|
|
friend class Wizard; |
|
|
|
|
friend class Witch; |
|
|
|
|
friend class sig::Animation; |
|
|
|
|
private: |
|
|
|
|
Class cl=WARRIOR; |
|
|
|
|
int hp=100,maxhp=hp; |
|
|
|
|
int mana=100,maxmana=mana; |
|
|
|
|
int atk=10; |
|
|
|
@ -54,6 +47,9 @@ struct Player{ |
|
|
|
|
bool upperLevel=false; |
|
|
|
|
void AddAnimation(AnimationState state); |
|
|
|
|
void Update(float fElapsedTime); |
|
|
|
|
void ChangeClass(Class cl); |
|
|
|
|
std::vector<Buff>buffList; |
|
|
|
|
protected: |
|
|
|
|
void SetSwordSwingTimer(float val); |
|
|
|
|
void SetState(State newState); |
|
|
|
|
void SetFacingDirection(Key direction); |
|
|
|
@ -66,10 +62,7 @@ struct Player{ |
|
|
|
|
void SetZ(float z); |
|
|
|
|
//Returns true if the move was valid and successful.
|
|
|
|
|
bool SetPos(vf2d pos); |
|
|
|
|
void SetClass(Class cl); |
|
|
|
|
std::vector<Buff>buffList; |
|
|
|
|
protected: |
|
|
|
|
public: |
|
|
|
|
public: |
|
|
|
|
Player(); |
|
|
|
|
const static float GROUND_SLAM_SPIN_TIME; |
|
|
|
|
vf2d&GetPos(); |
|
|
|
@ -109,4 +102,11 @@ struct Player{ |
|
|
|
|
|
|
|
|
|
//Triggers when the player has moved.
|
|
|
|
|
void Moved(); |
|
|
|
|
virtual ~Player()=default; |
|
|
|
|
virtual Class GetClass(); |
|
|
|
|
virtual bool AutoAttack(); |
|
|
|
|
virtual bool Ability1(); |
|
|
|
|
virtual bool Ability2(); |
|
|
|
|
virtual bool Ability3(); |
|
|
|
|
virtual bool RightClickAbility(); |
|
|
|
|
}; |