SDK/StateMachine: Add GetCurrentState function
Former-commit-id: 20b8c0d81deb5d5c6aafc1c8d4d261b046f260c3 [formerly 37762eaaf8bd7c0b2434b65dfc62d95d4ae2db15] [formerly 5606a74447be6048ce12a502722a75c726cbf9ef [formerly cc437974e34587cf7f63d8fb7f5447473826ee1c]] Former-commit-id: 677c22d4ebcfa8bf22a85210712fea061dedc0da [formerly 3979a42d5a2ed3c2635ed654bf6f25b88c32a00e] Former-commit-id: 0d31a924eead5ed4f384fcbdde6411054c3a9b27
This commit is contained in:
parent
a2fbd9f2d0
commit
ee1bd866ab
|
|
@ -23,6 +23,8 @@ namespace Ndk
|
|||
|
||||
inline void ChangeState(std::shared_ptr<State> state);
|
||||
|
||||
inline const std::shared_ptr<State>& GetCurrentState() const;
|
||||
|
||||
inline bool Update(float elapsedTime);
|
||||
|
||||
inline StateMachine& operator=(StateMachine&& fsm) = default;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,11 @@ namespace Ndk
|
|||
m_nextState = std::move(state);
|
||||
}
|
||||
|
||||
inline const std::shared_ptr<State>& StateMachine::GetCurrentState() const
|
||||
{
|
||||
return m_currentState;
|
||||
}
|
||||
|
||||
inline bool StateMachine::Update(float elapsedTime)
|
||||
{
|
||||
if (m_nextState)
|
||||
|
|
|
|||
Loading…
Reference in New Issue