testing iteration

This commit is contained in:
jadebenn
2024-12-17 22:06:41 -06:00
parent 93dcfddac5
commit 85eb5a7261
6 changed files with 235 additions and 25 deletions

View File

@@ -1,18 +1,5 @@
#include "Component.h"
Component::Component(Entity* parent) {
m_Parent = parent;
}
Component::~Component() {
}
Entity* Component::GetParent() const {
return m_Parent;
}
void Component::Update(float deltaTime) {
}

View File

@@ -13,14 +13,15 @@ class Entity;
*/
class Component {
public:
Component(Entity* parent);
virtual ~Component();
Component() = default;
Component(Entity* parent) : m_Parent{ parent } {}
virtual ~Component() = default;
/**
* Gets the owner of this component
* @return the owner of this component
*/
Entity* GetParent() const;
Entity* GetParent() const { return m_Parent; }
/**
* Updates the component in the game loop