示例#1
0
 private void SetMoveState(MoveState state, int slot)
 {
     if (state == null || slot < 0 || slot >= 3)
     {
         return;
     }
     if (this.curSlot < slot)
     {
         this.curSlot = slot;
     }
     if (this.moveStates[slot] != state)
     {
         if (this.moveStates[slot] != null)
         {
             this.moveStates[slot].Exit();
         }
         this.moveStates[slot] = state;
     }
     if (this.curSlot == slot)
     {
         state.Enter();
     }
 }