예제 #1
0
 public static void CheckClimbStop(ICanClimb actor, IGameInputWithDPad input)
 {
     if (input.GetButtonPressed(GameKeys.Jump))
     {
         EndClimb(actor);
     }
 }
예제 #2
0
 public static void CheckClimbStart(ICanClimb actor, IGameInputWithDPad input)
 {
     if (input.Pad.GetInputVector().Y != 0)
     {
         BeginClimb(actor);
     }
 }
예제 #3
0
 public static void EndClimb(ICanClimb actor)
 {
     if (actor.IsOnLadder.Active)
     {
         actor.IsOnLadder.Active = false;
         actor.GravityOn.Active  = true;
     }
 }
예제 #4
0
 private static void BeginClimb(ICanClimb actor)
 {
     actor.IsOnLadder.Active = true;
     actor.GravityOn.Active  = false;
     actor.Motion.Stop(Axis.Y, setTarget: true);
 }