예제 #1
0
 public override void UpdateInput(GameAction action)
 {
     //trigger walk if ordered to
     if (action.Type == GameAction.ActionType.Move)
     {
         NextAction = new WalkGroundAction(MapLoc, action.Dir, action[0] != 0, new FrameTick());
     }
 }
예제 #2
0
 public override void UpdateInput(GameAction action)
 {
     if (action.Type == GameAction.ActionType.Move)//start walk if ordered to
     {
         NextAction = new WalkGroundAction(MapLoc, action.Dir, action[0] != 0, ActionTime);
     }
     else
     {
         int prevTime = (skidTime / AnimTotalTime).ToFrames();
         int newTime  = (ActionTime / AnimTotalTime).ToFrames();
         if (prevTime < newTime)//stop skid if timed out
         {
             NextAction = new IdleGroundAction(MapLoc, CharDir);
         }
     }
 }