back to lobby state when server ends

This commit is contained in:
2023-08-14 13:35:17 +02:00
parent 118a04cd01
commit 7f650f282c
7 changed files with 36 additions and 10 deletions

View File

@@ -110,6 +110,11 @@ void World::Tick(std::uint64_t delta) {
CleanDeadMobs();
}
void World::Reset() {
m_Towers.clear();
m_Mobs.clear();
}
void World::SpawnMobAt(MobID id, MobType type, std::uint8_t level, PlayerID sender, float x, float y, Direction dir) {
MobPtr mob = MobFactory::CreateMob(id, type, level, sender);
mob->SetCenter({ x, y });