SDK/StateMachine: Add GetCurrentState function
Former-commit-id: 03f3085f56a0f547b21cd7bea75ff61541b0a8a5 [formerly 62183cea1c4c98a06a97de841f65bea108b9819d] [formerly ac9e462b7e2ccd7b5077dcdc315a97c42f5c2079 [formerly bf058e12205e1162a34dedabafe07390528edfb2]] Former-commit-id: 4fe43ca55388960e6506d978d5c82ed3cc696f14 [formerly 5084e4ffbe140a04855374d5f8c9bedbb6cc6b5a] Former-commit-id: c64604994a460fd8356bca46207b3e0d324b7ec4
This commit is contained in:
parent
5b83ac044b
commit
e03f281f43
|
|
@ -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