mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-21 13:55:10 +00:00
Adding components
This commit is contained in:
43
lib/wal/sources/Component/Component.cpp
Normal file
43
lib/wal/sources/Component/Component.cpp
Normal 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user