Пример #1
0
        private void Update()
        {
#if UNITY_EDITOR
            DebugInput();
#endif

            if (UnityEngine.Input.acceleration.sqrMagnitude > 3)
            {
                OnNudge?.Invoke();
            }

            for (int i = 0; i < UnityEngine.Input.touchCount; i++)
            {
                Touch touch = UnityEngine.Input.GetTouch(i);

                if (touch.phase == TouchPhase.Began)
                {
                    OnPaddleUp(touch.position);
                }
                else if (touch.phase == TouchPhase.Ended)
                {
                    OnPaddleDown(touch.position);
                }
            }

            CameraInput();
            PlungerInput();
            PanningInput();
        }
Пример #2
0
 void HandleNudgeAthlete(object sender, EventArgs e)
 {
     OnNudge?.Invoke();
 }