protected void SwitchToNewStage(AnimAction action) { if (NextAnimState != null) { CurrentAnimState.Release(); CurrentAnimState.OnDeactivate(); CurrentAnimState = NextAnimState; CurrentAnimState.OnActivate(action); NextAnimState = null; } }
public void UpdateAnimStates() { AnimEngine.Update(); if (CurrentAnimState.IsFinished()) { CurrentAnimState.OnDeactivate(); CurrentAnimState = DefaultAnimState; CurrentAnimState.OnActivate(null); } CurrentAnimState.Update(); }