diff --git a/src/GameState.cpp b/src/GameState.cpp index 98d2187..ef889a6 100644 --- a/src/GameState.cpp +++ b/src/GameState.cpp @@ -12,6 +12,7 @@ namespace GameState GameState::GameState(Object *parent, std::string name) : Object(parent, name) { + StateName(name); } const std::string GameState::StateName() diff --git a/src/Object.cpp b/src/Object.cpp index 1f77af7..de9dcca 100644 --- a/src/Object.cpp +++ b/src/Object.cpp @@ -204,6 +204,11 @@ void Object::TriggerOnActivate() { if (!Active()) return; + if (!_started) + { + OnStart(); + _started = true; + } for (Object *c : _children) c->TriggerOnActivate(); OnActivate();