Basic movement example
This commit is contained in:
@ -39,6 +39,11 @@ void SceneComponent::dispose() {
|
||||
sceneComponentState,
|
||||
SCENE_COMPONENT_STATE_DISPOSED
|
||||
);
|
||||
|
||||
// Clear Listeners
|
||||
for(auto &listener : this->listeners) listener();
|
||||
this->listeners.clear();
|
||||
|
||||
this->onDispose();
|
||||
this->item.reset();
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ namespace Dawn {
|
||||
uint_fast8_t sceneComponentState = 0;
|
||||
|
||||
protected:
|
||||
std::vector<std::function<void()>> listeners;
|
||||
|
||||
/**
|
||||
* Custom component listener that is invoked when the component is meant
|
||||
* to initialize.
|
||||
|
Reference in New Issue
Block a user