Beispiel #1
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);
    }