Пример #1
0
        void Update()
        {
            if (t < t0)
            {
                pointer0.Release(start0);
                pointer1.Release(start1);
            }
            else if (t < t1)
            {
                pointer0.Hover(start0);
                pointer1.Hover(start1);
            }
            else if (t < t2)
            {
                var a = (t - t1) / (t3 - t2);
                pointer0.Touch(start0 + (end0 - start0) * a);
                pointer1.Touch(start1 + (end1 - start1) * a);
            }
            else if (t < t3)
            {
                pointer0.Hover(end0);
                pointer1.Hover(end1);
            }
            else if (t < t4)
            {
                pointer0.Release(end0);
                pointer1.Release(end1);
            }
            else
            {
#if UNITY_EDITOR
                UnityEditor.EditorApplication.ExecuteMenuItem("Edit/Play");
#else
                Application.Quit();
#endif
            }

            t += Time.deltaTime;
        }
Пример #2
0
 void Touch()
 {
     GetPointer();
     pointer_.Touch();
 }