21 lines
396 B
C++
21 lines
396 B
C++
|
#include "Entity.h"
|
||
|
|
||
|
Entity::Entity(EntityType type)
|
||
|
: type(type), modelComponent(nullptr), lightComponent(nullptr) {
|
||
|
}
|
||
|
|
||
|
Entity::~Entity() {
|
||
|
if(modelComponent) {
|
||
|
delete modelComponent;
|
||
|
modelComponent = nullptr;
|
||
|
}
|
||
|
if(lightComponent) {
|
||
|
delete lightComponent;
|
||
|
lightComponent = nullptr;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
EntityType Entity::GetType() const {
|
||
|
return type;
|
||
|
}
|