修复状态机bug #104

Merged
sin365 merged 1 commits from Alienjack/AxibugEmuOnline:master into master 2025-08-19 09:59:29 +08:00

View File

@ -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()