Exemplo n.º 1
0
    public void ChangeControls(MobileControls mobileControls)
    {
        CurrentMobileControls = mobileControls;

        if (mobileControls == MobileControls.Joystick)
        {
            UIServiceLocator.Instance.PlayerJoystick.gameObject.SetActive(true);
        }
        else if (mobileControls == MobileControls.Gyroscope)
        {
            UIServiceLocator.Instance.PlayerJoystick.gameObject.SetActive(false);
            DeviceRotation.ResetReferenceRotation();
        }
    }