Class quick test swapping reimplemented.

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
2023-07-14 19:14:04 +00:00
co-authored by AMay
parent c75a01a1ad
commit 8d117c42e3
8 changed files with 34 additions and 27 deletions
+10
View File
@@ -62,6 +62,10 @@ protected:
float swordSwingTimer=0;
public:
Player();
//So this is rather fascinating and only exists because we have the ability to change classes which means we need to initialize a class
//using a new object type... Because of that we'll take the pointer reference to the old object and copy some of its properties to this new
//one. It's hackish but it means we can reduce the amount of extra boilerplate when class changing...I don't know how to feel about this.
Player(Player*player);
const static float GROUND_SLAM_SPIN_TIME;
vf2d&GetPos();
float GetX();
@@ -125,6 +129,7 @@ struct Warrior:Player{
static Ability rightClickAbility,ability1,ability2,ability3,ability4;
static AnimationState walk_n,walk_e,walk_s,walk_w,idle_n,idle_e,idle_s,idle_w;
Warrior();
Warrior(Player*player);
Class GetClass()override;
bool AutoAttack()override;
void OnUpdate(float fElapsedTime)override;
@@ -151,6 +156,7 @@ struct Thief:Player{
static Ability rightClickAbility,ability1,ability2,ability3,ability4;
static AnimationState walk_n,walk_e,walk_s,walk_w,idle_n,idle_e,idle_s,idle_w;
Thief();
Thief(Player*player);
Class GetClass()override;
bool AutoAttack()override;
void OnUpdate(float fElapsedTime)override;
@@ -177,6 +183,7 @@ struct Ranger:Player{
static Ability rightClickAbility,ability1,ability2,ability3,ability4;
static AnimationState walk_n,walk_e,walk_s,walk_w,idle_n,idle_e,idle_s,idle_w;
Ranger();
Ranger(Player*player);
Class GetClass()override;
bool AutoAttack()override;
void OnUpdate(float fElapsedTime)override;
@@ -203,6 +210,7 @@ struct Trapper:Player{
static Ability rightClickAbility,ability1,ability2,ability3,ability4;
static AnimationState walk_n,walk_e,walk_s,walk_w,idle_n,idle_e,idle_s,idle_w;
Trapper();
Trapper(Player*player);
Class GetClass()override;
bool AutoAttack()override;
void OnUpdate(float fElapsedTime)override;
@@ -229,6 +237,7 @@ struct Wizard:Player{
static Ability rightClickAbility,ability1,ability2,ability3,ability4;
static AnimationState walk_n,walk_e,walk_s,walk_w,idle_n,idle_e,idle_s,idle_w;
Wizard();
Wizard(Player*player);
Class GetClass()override;
bool AutoAttack()override;
void OnUpdate(float fElapsedTime)override;
@@ -255,6 +264,7 @@ struct Witch:Player{
static Ability rightClickAbility,ability1,ability2,ability3,ability4;
static AnimationState walk_n,walk_e,walk_s,walk_w,idle_n,idle_e,idle_s,idle_w;
Witch();
Witch(Player*player);
Class GetClass()override;
bool AutoAttack()override;
void OnUpdate(float fElapsedTime)override;