Adding a movable system/component

This commit is contained in:
Zoe Roux
2021-05-17 17:03:15 +02:00
parent 7313a9d4e0
commit 76ccd80df7
13 changed files with 157 additions and 41 deletions

View File

@@ -0,0 +1,22 @@
//
// Created by Zoe Roux on 5/17/21.
//
#include "MovableComponent.hpp"
namespace WAL::Movable
{
MovableComponent::MovableComponent(Entity &entity)
: Component(entity)
{}
Component *MovableComponent::clone(Entity &entity) const
{
return new MovableComponent(entity);
}
void MovableComponent::addForce(Vector3f force)
{
this->_acceleration += force;
}
}