public static void Change( InputController input , ValueKeeper <bool> facingRight) { if (input.Left) { facingRight.SetValue(false); } else if (input.Right) { facingRight.SetValue(true); } }
public static void Try( GameObject obj , ValueKeeper <int> grounded , ValueKeeper <int> hittingHead , ValueKeeper <State> state) { if (grounded == 0 && obj.Velocity.Y > 0) { state.SetValue(State.Fall); } else if (hittingHead > 0 && obj.Velocity.Y > -1000) { state.SetValue(State.Fall); } }
private static void Bot(ValueKeeper <int> grounded, Collider target, int duration) { if (target.Parent.Identifier == Identifier.Block) { grounded.SetValue(duration); } }
public static void Try(ValueKeeper <State> state, GameObject obj, ValueKeeper <int> hittingHead) { if (hittingHead > 0 && obj.Velocity.Y < 0) { state.SetValue(State.HeadBump); } }
public static void Try( InputController input , ValueKeeper <int> grounded , ValueKeeper <State> state) { if (grounded > 0 && (input.Jump.IsPressStaring || input.Jump.Heat > 0)) { state.SetValue(State.JumpStart); } }
public static void Try( InputController input , ValueKeeper <int> grounded , ValueKeeper <State> state) { if (!input.Left.IsPressed && !input.Right.IsPressed && grounded == Const.Grounded_Timer) { state.SetValue(State.Idle); } }
public static void Try( InputController input , ValueKeeper <int> grounded , ValueKeeper <State> state , GameObject obj) { if ((input.Left || input.Right) && grounded == Const.Grounded_Timer && obj.Velocity.Y >= 0) { state.SetValue(State.Walking); } }
public static void Try( GameObject obj , InputController input , ValueKeeper <int> grounded , ValueKeeper <State> state) { if (!input.Jump.IsPressed && obj.Velocity.Y < 0 && obj.Velocity.Y < -Const.stoppingGravity) { state.SetValue(State.JumpBreak); } }
public static void Try(ValueKeeper <State> state) { state.SetValue(State.Jump); }