Ejemplo n.º 1
0
    private void TryUseStriker(GamePad.Trigger trigger, Striker striker, ref bool triggerState)
    {
        float axis = GamePad.GetTrigger(trigger, PlayerShip.PlayerInfo.GamepadIndex);

        if (!triggerState)
        {
            if (axis >= gamepadTriggerSensitivity)
            {
                triggerState = true;
                striker.MoveBlade();
            }
        }
        else
        {
            if (axis < gamepadTriggerSensitivity)
            {
                triggerState = false;
                striker.StopBlade();
            }
        }
    }