players stat reset after game end
This commit is contained in:
@@ -19,7 +19,12 @@ void Game::Tick(std::uint64_t delta) {
|
|||||||
|
|
||||||
void Game::Reset() {
|
void Game::Reset() {
|
||||||
m_World->Reset();
|
m_World->Reset();
|
||||||
m_Players.clear();
|
|
||||||
|
for (auto& [id, player] : m_Players) {
|
||||||
|
player.SetExp(0);
|
||||||
|
player.SetGold(0);
|
||||||
|
player.SetTeamColor(TeamColor::None);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Player* Game::GetPlayerById(PlayerID id) {
|
Player* Game::GetPlayerById(PlayerID id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user