diff --git a/SDK/include/NDK/StateMachine.hpp b/SDK/include/NDK/StateMachine.hpp index 8e7ad2f64..c36464fea 100644 --- a/SDK/include/NDK/StateMachine.hpp +++ b/SDK/include/NDK/StateMachine.hpp @@ -23,6 +23,8 @@ namespace Ndk inline void ChangeState(std::shared_ptr state); + inline const std::shared_ptr& GetCurrentState() const; + inline bool Update(float elapsedTime); inline StateMachine& operator=(StateMachine&& fsm) = default; diff --git a/SDK/include/NDK/StateMachine.inl b/SDK/include/NDK/StateMachine.inl index fc4c7f787..7b5109ab5 100644 --- a/SDK/include/NDK/StateMachine.inl +++ b/SDK/include/NDK/StateMachine.inl @@ -26,6 +26,11 @@ namespace Ndk m_nextState = std::move(state); } + inline const std::shared_ptr& StateMachine::GetCurrentState() const + { + return m_currentState; + } + inline bool StateMachine::Update(float elapsedTime) { if (m_nextState)