Пример #1
0
    private void CheckKeyBord()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            EscClick();
        }
        if (Input.GetKeyDown(KeyCode.Home))
        {
            HomeClick();
        }
        //if (Input.touchCount == 5)
        //{
        //    IsCacheLog = !IsCacheLog;
        //    Utils.Log("监听日志开关 :" + IsCacheLog);
        //}
        if ((Input.touchCount == 3) && IsCacheLog)
        {
            if (Input.GetTouch(0).phase != TouchPhase.Ended)
            {
                return;
            }
            IsShowLog = !IsShowLog;
            Utils.Log("日志界面开关 :" + IsShowLog);
            if (IsShowLog)
            {
                GUILogWindow.Show();
            }
            else
            {
                GUILogWindow.Hide();
            }
        }
        //if ((Input.touchCount == 2) && IsCacheLog)
        //{
        //    if (Input.touches[0].phase != TouchPhase.Ended)
        //    {
        //        return;
        //    }
        //    Utils.Log("日志缩放界面开关 :" + IsShowLog);

        //    for (int i = 0; i < 2; i++)
        //    {
        //        Touch touch = Input.touches[i];
        //        if (touch.phase == TouchPhase.Ended)
        //        {
        //            startPos[i] = touch.rawPosition;
        //            endPos[i] = touch.deltaPosition;
        //        }
        //    }
        //    if (Direction(startPos, endPos))
        //    {
        //        GUILogWindow.Show();
        //    }
        //    else
        //    {
        //        GUILogWindow.Hide();
        //    }
        //}
    }
Пример #2
0
 public void OnDestroy()
 {
     ClearLogMsgList();
     if (_instacne != null)
     {
         uiManager = null;
         _instacne = null;
     }
 }
Пример #3
0
 public static void Show()
 {
     if (_instacne == null)
     {
         GameObject obj = new GameObject("GUILogWindow");
         _instacne = obj.AddComponent <GUILogWindow>();
         DontDestroyOnLoad(obj);
     }
     else
     {
         _instacne.gameObject.SetActive(true);
     }
 }