示例#1
0
    void FixedUpdate()
    {
        var gamepad = Gamepad.current;

        if (gamepad == null)
        {
            return; // No gamepad connected.
        }
        if (gamepad.rightTrigger.isPressed)
        {
            muscle.contract();
        }
        else
        {
            muscle.relax();
        }
    }