Exemplo n.º 1
0
 public override void UpdateInput(GameAction action)
 {
     if (Complete)
     {
         NextAction = new IdleGroundAction(CurPos, CharDir);
     }
 }
Exemplo n.º 2
0
 public override void UpdateInput(GameAction action)
 {
     if (!Loop && ActionTime >= AnimTotalTime)
     {
         NextAction = new IdleGroundAction(MapLoc, CharDir);
     }
 }
Exemplo n.º 3
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);
         }
     }
 }
Exemplo n.º 4
0
 public override void UpdateInput(GameAction action)
 {
     if (action.Type == GameAction.ActionType.Move)//change direction of walk if ordered to
     {
         CharDir = action.Dir;
         run     = (action[0] != 0);
     }
     else if (action.Type == GameAction.ActionType.None)     //start skid if ordered to
     {
         NextAction = new IdleGroundAction(MapLoc, CharDir); // new SkidGroundAction(MapLoc, CharDir, ActionTime);
     }
     // attempting to interact does not halt movement
     // but we don't want players to notice
     // so don't change direction or run state until the frame after
     // note that this only applies to interaction attempts that fail to find something to interact with.
 }