Update systems to the new view

This commit is contained in:
Zoe Roux
2021-06-05 18:42:10 +02:00
parent acb3935c7c
commit f20445cdc8
24 changed files with 213 additions and 131 deletions
+3 -3
View File
@@ -12,10 +12,10 @@ namespace BBM
: System(wal)
{}
void MovableSystem::onFixedUpdate(WAL::Entity &entity)
void MovableSystem::onFixedUpdate(WAL::ViewEntity<MovableComponent, PositionComponent> &entity)
{
auto &movable = entity.getComponent<MovableComponent>();
auto &position = entity.getComponent<PositionComponent>();
auto &movable = entity.get<MovableComponent>();
auto &position = entity.get<PositionComponent>();
position.position += movable._velocity;
movable._velocity = movable._acceleration;