Esempio n. 1
0
    private void Update()
    {
        float scroll = Input.GetAxis("Mouse ScrollWheel");

        if (scroll != 0f)
        {
            //Debug.Log("scroll = " + scroll);
            _phoneController.ScrollPhotoGallery(scroll);
        }


        //togglePhotoGallery
        if (Input.GetKeyDown(togglePhotoGallery))
        {
            _phoneController.OpenPhotoGallery(_phoneController.currentApp != PhoneController.Apps.PhoneGallery);
        }

        //public KeyCode phoneToggle;
        if (Input.GetKeyDown(phoneToggle))
        {
            if (!_phoneController.phoneEnabled)
            {
                _phoneController.ShowPhone();
            }
            else
            {
                _phoneController.HidePhone();
            }
        }


        // public KeyCode halfShowPhone;
        if (Input.GetKeyDown(halfShowPhone))
        {
            if (_phoneController.currentState == PhoneController.PhoneState.ScreenButtom)
            {
                _phoneController.RecenterPhone();
            }
            else
            {
                _phoneController.HalfShowPhone();
            }
        }


        // public KeyCode togglephoneCamera;
        if (Input.GetKeyDown(togglePhoneCamera))
        {
            _phoneController.ActivateCamera(_phoneController.currentApp != PhoneController.Apps.Camera);
        }

        // public KeyCode toggleWhatsApp;
        if (Input.GetKeyDown(toggleWhatsApp))
        {
            _phoneController.ActivateWhatsapp(_phoneController.currentApp != PhoneController.Apps.Whatsapp);
        }
    }