public virtual void DoInput(FGInput input) { if (acceptedInputs.canJump) { if (input.commandInput == CommandInput.Jump) { Jump(); } } if (acceptedInputs.canMove) { if (input.commandInput == CommandInput.FF) { if (Grounded()) { running = true; } else { Dash(true); } } if (input.commandInput == CommandInput.BB) { Dash(false); } } if (acceptedInputs.canAttack) { } }
void DetectJump() { if (JumpInput() != StickInput.Neutral) { FGInput input = new FGInput(); input.button = Button.None; input.stick = JumpInput(); input.commandInput = CommandInput.Jump; DoInput(input); } }
public void DoInput(FGInput input) { string direction = ""; string button = input.button.ToString(); if (input.commandInput != CommandInput.None) { direction = input.commandInput.ToString(); } else { if (input.stick != StickInput.Neutral) { direction = input.stick.ToString(); } } if (input.button == WST.Button.None && input.commandInput == CommandInput.Jump) { direction = input.commandInput.ToString(); button = input.stick.ToString(); } commandText.text = string.Format("{0} {1}", direction, button); }