feat: add mob spawn notification
This commit is contained in:
@@ -114,6 +114,7 @@ void World::spawnMobAt(MobID id, MobType type, std::uint8_t level, PlayerID send
|
|||||||
mob->setCenter({ x, y });
|
mob->setCenter({ x, y });
|
||||||
mob->setDirection(dir);
|
mob->setDirection(dir);
|
||||||
m_Mobs.push_back(mob);
|
m_Mobs.push_back(mob);
|
||||||
|
getMobNotifier().notifyListeners(&MobListener::OnMobSpawn, mob.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
TowerPtr World::placeTowerAt(TowerID id, TowerType type, std::int32_t x, std::int32_t y, PlayerID builder) {
|
TowerPtr World::placeTowerAt(TowerID id, TowerType type, std::int32_t x, std::int32_t y, PlayerID builder) {
|
||||||
|
|||||||
Reference in New Issue
Block a user