Ejemplo n.º 1
0
 protected void SwitchToNewStage(AnimAction action)
 {
     if (NextAnimState != null)
     {
         CurrentAnimState.Release();
         CurrentAnimState.OnDeactivate();
         CurrentAnimState = NextAnimState;
         CurrentAnimState.OnActivate(action);
         NextAnimState = null;
     }
 }
Ejemplo n.º 2
0
    public void UpdateAnimStates()
    {
        AnimEngine.Update();

        if (CurrentAnimState.IsFinished())
        {
            CurrentAnimState.OnDeactivate();
            CurrentAnimState = DefaultAnimState;
            CurrentAnimState.OnActivate(null);
        }
        CurrentAnimState.Update();
    }