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