feat: add kill reward + effect damages
This commit is contained in:
@@ -12,14 +12,14 @@ class Player {
|
||||
private:
|
||||
game::TeamColor m_TeamColor;
|
||||
|
||||
std::uint32_t m_Gold = 0;
|
||||
std::uint32_t m_EXP = 0;
|
||||
std::uint32_t m_Gold;
|
||||
std::uint32_t m_EXP;
|
||||
std::string m_Name;
|
||||
std::uint8_t m_ID;
|
||||
|
||||
std::uint8_t m_GoldPerSecond = 5;
|
||||
std::uint8_t m_GoldPerSecond;
|
||||
public:
|
||||
Player(std::uint8_t id = 0) : m_TeamColor(game::TeamColor::None), m_ID(id) {}
|
||||
Player(std::uint8_t id = 0) : m_TeamColor(game::TeamColor::None), m_Gold(0), m_EXP(0), m_ID(id), m_GoldPerSecond(5) {}
|
||||
|
||||
const std::string& getName() const { return m_Name; }
|
||||
void setName(const std::string& name) { m_Name = name; }
|
||||
@@ -32,9 +32,13 @@ public:
|
||||
|
||||
std::uint32_t getGold() const { return m_Gold; }
|
||||
void setGold(std::uint32_t gold) { m_Gold = gold; }
|
||||
void addGold(std::uint32_t gold) { m_Gold += gold; }
|
||||
void removeGold(std::uint32_t gold) { m_Gold -= gold; }
|
||||
|
||||
std::uint32_t getEXP() const { return m_EXP; }
|
||||
void setEXP(std::uint32_t exp) { m_EXP = exp; }
|
||||
void addEXP(std::uint32_t exp) { m_EXP += exp; }
|
||||
void removeEXP(std::uint32_t exp) { m_EXP -= exp; }
|
||||
|
||||
std::uint8_t getID() const { return m_ID; }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user