22 lines
466 B
C++
22 lines
466 B
C++
#include "Entity.hpp"
|
|
|
|
Entity::Entity(const Vector3& pos, uint32_t entityId)
|
|
: position(pos), id(entityId) {
|
|
}
|
|
|
|
void Entity::update(float deltaTime) {
|
|
if (!active) return;
|
|
|
|
position = Vector3Add(position, Vector3Scale(velocity, deltaTime));
|
|
}
|
|
|
|
void Entity::render() {
|
|
}
|
|
|
|
void Entity::move(const Vector3& delta) {
|
|
position = Vector3Add(position, delta);
|
|
}
|
|
|
|
void Entity::rotate(const Vector3& delta) {
|
|
rotation = Vector3Add(rotation, delta);
|
|
} |