mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-25 23:49:03 +00:00
fixed compil and finished moving files to the game
This commit is contained in:
@@ -3,26 +3,26 @@
|
||||
//
|
||||
|
||||
#include "Component/Position/PositionComponent.hpp"
|
||||
#include "System/Movable/MovableSystem.hpp"
|
||||
#include "MovableSystem.hpp"
|
||||
#include "Component/Movable/MovableComponent.hpp"
|
||||
#include "Wal.hpp"
|
||||
|
||||
namespace WAL
|
||||
namespace BBM
|
||||
{
|
||||
MovableSystem::MovableSystem()
|
||||
: System({
|
||||
: WAL::System({
|
||||
typeid(MovableComponent),
|
||||
typeid(PositionComponent)
|
||||
})
|
||||
{}
|
||||
|
||||
void MovableSystem::onFixedUpdate(Entity &entity)
|
||||
void MovableSystem::onFixedUpdate(WAL::Entity &entity)
|
||||
{
|
||||
auto &movable = entity.getComponent<MovableComponent>();
|
||||
auto &position = entity.getComponent<PositionComponent>();
|
||||
|
||||
position.position += movable._velocity * Wal::timestep.count();
|
||||
movable._velocity = movable._acceleration * Wal::timestep.count();
|
||||
movable._acceleration = Vector3f();
|
||||
position.position += movable._velocity * WAL::Wal::timestep.count();
|
||||
movable._velocity = movable._acceleration * WAL::Wal::timestep.count();
|
||||
movable._acceleration = WAL::Vector3f();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user