TriggerSystem implemented and working.

This commit is contained in:
William Moberg
2015-12-16 12:22:15 +01:00
parent 99b76d7ae1
commit d10df6ae09
5 changed files with 75 additions and 54 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ void PlayerSystem::UpdateComponent(World * world, ComponentWrapper & player, dou
} else {
m_Direction.x = 0;
}
m_EventBroker->Process<PlayerSystem>();
ComponentWrapper& transform = world->GetComponent(player.EntityID, "Transform");
(glm::vec3&)player["Velocity"] = m_Speed * float(dt) * m_Direction;
(glm::vec3&)transform["Position"] += (glm::vec3)player["Velocity"];