SDK/StateMachine: Add GetCurrentState function
Former-commit-id: 3fb462b92a8b1190c974f16079458fccbcc0135a [formerly 4092a64ff127dd696ea0f824687670a18367e28f] [formerly 926df48c28edb7db9682e4a16613f5a6e12e8f26 [formerly 2cff9c75a1b974b6407fd0ff577dd50d620f18e2]] Former-commit-id: 3555eea4a1e89a4c6e750349c55e603b6d4dc237 [formerly b60dbd584782aafc339acaa666cd45508ef9891d] Former-commit-id: 0ddbe91d5bab84c65429e651ed8585d7129e04f0
This commit is contained in:
parent
ca1b9c1988
commit
e7b940c6cf
|
|
@ -23,6 +23,8 @@ namespace Ndk
|
||||||
|
|
||||||
inline void ChangeState(std::shared_ptr<State> state);
|
inline void ChangeState(std::shared_ptr<State> state);
|
||||||
|
|
||||||
|
inline const std::shared_ptr<State>& GetCurrentState() const;
|
||||||
|
|
||||||
inline bool Update(float elapsedTime);
|
inline bool Update(float elapsedTime);
|
||||||
|
|
||||||
inline StateMachine& operator=(StateMachine&& fsm) = default;
|
inline StateMachine& operator=(StateMachine&& fsm) = default;
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,11 @@ namespace Ndk
|
||||||
m_nextState = std::move(state);
|
m_nextState = std::move(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline const std::shared_ptr<State>& StateMachine::GetCurrentState() const
|
||||||
|
{
|
||||||
|
return m_currentState;
|
||||||
|
}
|
||||||
|
|
||||||
inline bool StateMachine::Update(float elapsedTime)
|
inline bool StateMachine::Update(float elapsedTime)
|
||||||
{
|
{
|
||||||
if (m_nextState)
|
if (m_nextState)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue