Пример #1
0
        static void Update()
        {
            bool timerIsRunning = EditorPrefs.GetBool("TimeTools." + Application.productName + ".TimerIsRunning", false);

            if (timerIsRunning)
            {
                double timerTimeRemove = double.Parse(EditorPrefs.GetString("TimeTools." + Application.productName + ".TimerTimeRemove", "0"));

                double timerTime = TimerWindow.timeToWait - timerTimeRemove - (EditorApplication.timeSinceStartup - TimerWindow.startCoundownTime);
                if (timerTime <= 0)
                {
                    TimerWindow.FireAlarm();
                }
            }
        }
Пример #2
0
        public static void OpenWindow()
        {
            if (window == null)
            {
                window = (TimerWindow)GetWindow(typeof(TimerWindow));

                wTitle.text         = "Timer";
                wTitle.image        = EditorGUIUtility.IconContent("UnityEditor.ProfilerWindow").image;
                wTitle.tooltip      = "Use this tool as a usual timer";
                window.minSize      = new Vector2(300f, 130f);
                window.maxSize      = window.minSize;
                window.titleContent = wTitle;
            }

            window.Show();
        }
Пример #3
0
 static void Start()
 {
     ChronometerWindow.ClearData();
     TimerWindow.ClearData();
 }