Beispiel #1
0
        private void OpenAllTimerAndBeginWatch()
        {
            bool allNull = true;

            for (int i = 0; i < 16; i++)
            {
                if (timer[i] != null)
                {
                    allNull = false;
                }
            }
            if (allNull)
            {
                return;
            }

            KeyboradEnable = false;
            TimerWatch.Start();
            for (int i = 0; i < 16; i++)
            {
                if (timer[i] != null)
                {
                    timer[i].Start();
                }
            }
        }
Beispiel #2
0
        public void ExampleOfWait()
        {
            Debug.Log("This is before wait");
            TimerWatch watch = new TimerWatch();
            TimerInfo  info  = new TimerInfo(this.info);

            info.id              = "Example";
            info.OnTickInt       = i => { Debug.Log($"Tick : {i}"); };
            info.OnTimerFinished = () => { Debug.Log("Timer Finished"); };
            App.GetCoroutineHandler().StartTimer(info, watch);
        }
Beispiel #3
0
        public void StartScaledTimer()
        {
            TimerWatch watch       = new TimerWatch();
            TimerInfo  infoCurrent = new TimerInfo(info);

            infoCurrent.id              = "s";
            infoCurrent.OnTickInt       = i => { D.Log($"tickScaled = {i}"); };
            infoCurrent.OnTickContinous = f => { D.Log($"tickContinuous = {f}"); };
            infoCurrent.OnTimerFinished = () => { D.Log($"Timer finished SCALED"); };

            App.GetCoroutineHandler().StartTimer(watch: watch, info: infoCurrent);
        }
Beispiel #4
0
        private void TimerWatch_Tick(object sender, EventArgs e)
        {
            bool isFinish = true;

            for (int i = 0; i < 16; i++)
            {
                if (timer[i] != null)
                {
                    isFinish = false;
                }
            }
            if (isFinish)
            {
                CreatImage();
                KeyboradEnable = true;
                TimerWatch.Stop();
            }
        }