示例#1
0
    //

    /*If the player is in this state, they will always do whatever is in state update.
     * Which includes accepting new input and */
    public override void StateUpdate()
    {
        pi.playerScript.Idle();
        mi = pi.GetMovementInput();
        ji = pi.GetJumpInput();
        ai = pi.GetAimInput();
        //Default playerstate behavior to swap weapons in any state
        HandleWeaponSwapInput(pi);
    }
示例#2
0
    public override void StateUpdate()
    {
        fi  = pi.GetFireWeaponInput();
        mi  = pi.GetMovementInput();
        rsi = pi.GetRightStickInput();
        ji  = pi.GetJumpInput();
        ai  = pi.GetAimInput();

        if (fi > 0f)
        {
            pi.playerScript.FireCurrentWeapon();
        }
        else
        {
            pi.playerScript.StopFireWeapon();
        }

        pi.playerScript.Strafe(mi, rsi);
        //Default playerstate behavior to swap weapons in any state
        HandleWeaponSwapInput(pi);
    }