refactor: changed to PlayerID type
This commit is contained in:
@@ -15,9 +15,10 @@ private:
|
|||||||
std::uint32_t m_Gold;
|
std::uint32_t m_Gold;
|
||||||
std::uint32_t m_Exp;
|
std::uint32_t m_Exp;
|
||||||
std::string m_Name;
|
std::string m_Name;
|
||||||
std::uint8_t m_ID;
|
PlayerID m_ID;
|
||||||
|
|
||||||
std::uint8_t m_GoldPerSecond;
|
std::uint8_t m_GoldPerSecond;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Player(std::uint8_t id = 0) : m_TeamColor(game::TeamColor::None), m_Gold(0), m_Exp(0), m_ID(id), m_GoldPerSecond(5) {}
|
Player(std::uint8_t id = 0) : m_TeamColor(game::TeamColor::None), m_Gold(0), m_Exp(0), m_ID(id), m_GoldPerSecond(5) {}
|
||||||
|
|
||||||
@@ -40,7 +41,7 @@ public:
|
|||||||
void addExp(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; }
|
void removeExp(std::uint32_t exp) { m_Exp -= exp; }
|
||||||
|
|
||||||
std::uint8_t getID() const { return m_ID; }
|
PlayerID getID() const { return m_ID; }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace game
|
} // namespace game
|
||||||
|
|||||||
Reference in New Issue
Block a user