feat: sync game
This commit is contained in:
@@ -13,8 +13,9 @@ class ServerGame : public game::Game, public game::GameListener {
|
||||
private:
|
||||
Server* m_Server;
|
||||
ServerWorld m_ServerWorld;
|
||||
utils::AutoTimer m_GoldMineTimer{ 1000, std::bind(&ServerGame::updateGoldMines, this) };
|
||||
utils::CooldownTimer m_EndGameCooldown{ 1000 * 10 };
|
||||
utils::AutoTimer m_GoldMineTimer;
|
||||
utils::AutoTimer m_MobStatesTimer;
|
||||
utils::CooldownTimer m_EndGameCooldown;
|
||||
public:
|
||||
ServerGame(Server* server);
|
||||
~ServerGame() {}
|
||||
@@ -32,6 +33,7 @@ public:
|
||||
virtual void OnGameClose();
|
||||
private:
|
||||
void balanceTeams();
|
||||
void updateMobStates();
|
||||
void updateGoldMines();
|
||||
void updatePlayerStats();
|
||||
};
|
||||
|
||||
@@ -23,6 +23,8 @@ public:
|
||||
|
||||
virtual void OnMobDie(game::Mob* mob);
|
||||
|
||||
virtual void OnMobCastleDamage(game::Mob* damager, game::TeamCastle* enemyCastle, float damage);
|
||||
|
||||
};
|
||||
|
||||
} // namespace server
|
||||
|
||||
Reference in New Issue
Block a user