too many things
This commit is contained in:
15
src/td/simulation/CommandApply.cpp
Normal file
15
src/td/simulation/CommandApply.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <td/simulation/CommandApply.h>
|
||||
|
||||
namespace td {
|
||||
namespace sim {
|
||||
|
||||
CommandApply::CommandApply(const game::World& a_World, WorldSnapshot& a_Snapshot) : m_World(a_World), m_Snapshot(a_Snapshot) {}
|
||||
|
||||
void CommandApply::Handle(const protocol::cdata::SpawnTroop& a_SpawnTroop) {
|
||||
auto zombie = std::make_shared<game::Zombie>(0, *a_SpawnTroop.m_Level, a_SpawnTroop.m_Sender);
|
||||
zombie->GetPosition() = a_SpawnTroop.m_Position;
|
||||
m_Snapshot.m_Mobs.push_back(zombie);
|
||||
}
|
||||
|
||||
} // namespace sim
|
||||
} // namespace td
|
||||
Reference in New Issue
Block a user