Adding components

This commit is contained in:
Zoe Roux
2021-05-14 17:37:14 +02:00
parent 9578e4e580
commit d6aaf30c3b
8 changed files with 195 additions and 42 deletions

View File

@@ -0,0 +1,43 @@
//
// Created by Zoe Roux on 2021-05-14.
//
#include "Component/Component.hpp"
namespace WAL
{
Component::Component(std::string name, Entity &entity)
: _name(std::move(name)),
_entity(entity)
{ }
std::string Component::getName() const
{
return this->_name;
}
bool Component::isDisabled() const
{
return this->_disabled;
}
void Component::setDisable(bool disabled)
{
this->_disabled = disabled;
}
const std::vector<std::type_index> &Component::getDependencies() const
{
return this->_dependencies;
}
void Component::onStart()
{
//TODO handle events here
}
void Component::onStop()
{
//TODO handle events here
}
}