Ejemplo n.º 1
0
    void Update()
    {
        if (!Input.GetMouseButton(0))
        {
            _motorBike.Neutral();
            return;
        }

        if (Input.mousePosition.x > Screen.width / 2)
        {
            _motorBike.Accelerate();
        }
        else
        {
            _motorBike.Break();
        }
    }