修复状态机bug
This commit is contained in:
parent
15c64ae655
commit
629cd16016
@ -75,9 +75,12 @@ namespace AxibugEmuOnline.Client.Tools
|
||||
if (nextState == null) return;
|
||||
|
||||
if (m_current != null) m_current.OnExit(nextState);
|
||||
nextState.LastState = m_current;
|
||||
nextState.OnEnter(m_current);
|
||||
|
||||
var preState = m_current;
|
||||
m_current = nextState;
|
||||
|
||||
m_current.LastState = preState;
|
||||
m_current.OnEnter(preState);
|
||||
}
|
||||
|
||||
public T GetState<T>() where T : State, new()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user