Esempio n. 1
0
        public void ForceDone()
        {
            is_active = false;
            sleep_timer.StopClear();

            current_value = GetTargetValue();

            OnUpdate.InvokeAll();
            OnDone.InvokeAll();
        }
Esempio n. 2
0
        public bool Update()
        {
            float delta_time = step_timer.RestartGetSeconds();

            if (is_active && delta_time > 0.0f)
            {
                if (UpdateValue(GetTargetValue(), delta_time))
                {
                    sleep_timer.Start();
                    if (sleep_timer.IsTimeOver())
                    {
                        return(DoDone());
                    }
                }
                else
                {
                    sleep_timer.StopClear();
                }

                OnUpdate.InvokeAll();
            }

            return(is_active);
        }