Merge pull request '修复状态机bug' (#104) from Alienjack/AxibugEmuOnline:master into master

Reviewed-on: sin365/AxibugEmuOnline#104
This commit is contained in:
sin365 2025-08-19 09:59:24 +08:00
commit 33283a9a34

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