|
|
@ -19,6 +19,12 @@ struct CastInfo{ |
|
|
|
struct Player{ |
|
|
|
struct Player{ |
|
|
|
friend class Crawler; |
|
|
|
friend class Crawler; |
|
|
|
friend class sig::Animation; |
|
|
|
friend class sig::Animation; |
|
|
|
|
|
|
|
friend class Warrior; |
|
|
|
|
|
|
|
friend class Thief; |
|
|
|
|
|
|
|
friend class Ranger; |
|
|
|
|
|
|
|
friend class Trapper; |
|
|
|
|
|
|
|
friend class Wizard; |
|
|
|
|
|
|
|
friend class Witch; |
|
|
|
private: |
|
|
|
private: |
|
|
|
int hp=100,maxhp=hp; |
|
|
|
int hp=100,maxhp=hp; |
|
|
|
int mana=100,maxmana=mana; |
|
|
|
int mana=100,maxmana=mana; |
|
|
@ -119,7 +125,6 @@ public: |
|
|
|
virtual Class GetClass()=0; |
|
|
|
virtual Class GetClass()=0; |
|
|
|
virtual bool AutoAttack()=0; |
|
|
|
virtual bool AutoAttack()=0; |
|
|
|
virtual void OnUpdate(float fElapsedTime)=0; |
|
|
|
virtual void OnUpdate(float fElapsedTime)=0; |
|
|
|
virtual void InitializeClassAbilities()=0; |
|
|
|
|
|
|
|
virtual std::string GetClassName()=0; |
|
|
|
virtual std::string GetClassName()=0; |
|
|
|
virtual Ability&GetRightClickAbility()=0; |
|
|
|
virtual Ability&GetRightClickAbility()=0; |
|
|
|
virtual Ability&GetAbility1()=0; |
|
|
|
virtual Ability&GetAbility1()=0; |
|
|
@ -148,7 +153,7 @@ struct Warrior:Player{ |
|
|
|
Class GetClass()override; |
|
|
|
Class GetClass()override; |
|
|
|
bool AutoAttack()override; |
|
|
|
bool AutoAttack()override; |
|
|
|
void OnUpdate(float fElapsedTime)override; |
|
|
|
void OnUpdate(float fElapsedTime)override; |
|
|
|
void InitializeClassAbilities()override; |
|
|
|
static void InitializeClassAbilities(); |
|
|
|
std::string GetClassName()override; |
|
|
|
std::string GetClassName()override; |
|
|
|
Ability&GetRightClickAbility()override; |
|
|
|
Ability&GetRightClickAbility()override; |
|
|
|
Ability&GetAbility1()override; |
|
|
|
Ability&GetAbility1()override; |
|
|
@ -175,7 +180,7 @@ struct Thief:Player{ |
|
|
|
Class GetClass()override; |
|
|
|
Class GetClass()override; |
|
|
|
bool AutoAttack()override; |
|
|
|
bool AutoAttack()override; |
|
|
|
void OnUpdate(float fElapsedTime)override; |
|
|
|
void OnUpdate(float fElapsedTime)override; |
|
|
|
void InitializeClassAbilities()override; |
|
|
|
static void InitializeClassAbilities(); |
|
|
|
std::string GetClassName()override; |
|
|
|
std::string GetClassName()override; |
|
|
|
Ability&GetRightClickAbility()override; |
|
|
|
Ability&GetRightClickAbility()override; |
|
|
|
Ability&GetAbility1()override; |
|
|
|
Ability&GetAbility1()override; |
|
|
@ -202,7 +207,7 @@ struct Ranger:Player{ |
|
|
|
Class GetClass()override; |
|
|
|
Class GetClass()override; |
|
|
|
bool AutoAttack()override; |
|
|
|
bool AutoAttack()override; |
|
|
|
void OnUpdate(float fElapsedTime)override; |
|
|
|
void OnUpdate(float fElapsedTime)override; |
|
|
|
void InitializeClassAbilities()override; |
|
|
|
static void InitializeClassAbilities(); |
|
|
|
std::string GetClassName()override; |
|
|
|
std::string GetClassName()override; |
|
|
|
Ability&GetRightClickAbility()override; |
|
|
|
Ability&GetRightClickAbility()override; |
|
|
|
Ability&GetAbility1()override; |
|
|
|
Ability&GetAbility1()override; |
|
|
@ -229,7 +234,7 @@ struct Trapper:Player{ |
|
|
|
Class GetClass()override; |
|
|
|
Class GetClass()override; |
|
|
|
bool AutoAttack()override; |
|
|
|
bool AutoAttack()override; |
|
|
|
void OnUpdate(float fElapsedTime)override; |
|
|
|
void OnUpdate(float fElapsedTime)override; |
|
|
|
void InitializeClassAbilities()override; |
|
|
|
static void InitializeClassAbilities(); |
|
|
|
std::string GetClassName()override; |
|
|
|
std::string GetClassName()override; |
|
|
|
Ability&GetRightClickAbility()override; |
|
|
|
Ability&GetRightClickAbility()override; |
|
|
|
Ability&GetAbility1()override; |
|
|
|
Ability&GetAbility1()override; |
|
|
@ -256,7 +261,7 @@ struct Wizard:Player{ |
|
|
|
Class GetClass()override; |
|
|
|
Class GetClass()override; |
|
|
|
bool AutoAttack()override; |
|
|
|
bool AutoAttack()override; |
|
|
|
void OnUpdate(float fElapsedTime)override; |
|
|
|
void OnUpdate(float fElapsedTime)override; |
|
|
|
void InitializeClassAbilities()override; |
|
|
|
static void InitializeClassAbilities(); |
|
|
|
std::string GetClassName()override; |
|
|
|
std::string GetClassName()override; |
|
|
|
Ability&GetRightClickAbility()override; |
|
|
|
Ability&GetRightClickAbility()override; |
|
|
|
Ability&GetAbility1()override; |
|
|
|
Ability&GetAbility1()override; |
|
|
@ -283,7 +288,7 @@ struct Witch:Player{ |
|
|
|
Class GetClass()override; |
|
|
|
Class GetClass()override; |
|
|
|
bool AutoAttack()override; |
|
|
|
bool AutoAttack()override; |
|
|
|
void OnUpdate(float fElapsedTime)override; |
|
|
|
void OnUpdate(float fElapsedTime)override; |
|
|
|
void InitializeClassAbilities()override; |
|
|
|
static void InitializeClassAbilities(); |
|
|
|
std::string GetClassName()override; |
|
|
|
std::string GetClassName()override; |
|
|
|
Ability&GetRightClickAbility()override; |
|
|
|
Ability&GetRightClickAbility()override; |
|
|
|
Ability&GetAbility1()override; |
|
|
|
Ability&GetAbility1()override; |
|
|
|