示例#1
0
 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)
     {
     }
 }
示例#2
0
 void DetectJump()
 {
     if (JumpInput() != StickInput.Neutral)
     {
         FGInput input = new FGInput();
         input.button       = Button.None;
         input.stick        = JumpInput();
         input.commandInput = CommandInput.Jump;
         DoInput(input);
     }
 }
示例#3
0
    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);
    }