Basic movement and camera management between players and editor

This commit is contained in:
2016-01-22 16:12:51 +01:00
parent 1e3fc1ae2d
commit ca2aab449e
24 changed files with 499 additions and 176 deletions
+8
View File
@@ -38,6 +38,14 @@ void PlayerSpawnSystem::Update(double dt)
e.Player = player;
e.Spawner = spawner;
m_EventBroker->Publish(e);
// Set the camera to the correct entity
EntityWrapper cameraEntity = player.FirstChildByName("Camera");
if (cameraEntity.Valid()) {
Events::SetCamera e;
e.CameraEntity = cameraEntity;
m_EventBroker->Publish(e);
}
}
}
m_SpawnRequests.clear();