Esempio n. 1
0
 protected override void PreDestruct()
 {
     if (m_task != null)
     {
         m_task.Cancel();
         LogicTask.Recycle(m_task);
         m_task = null;
     }
     if (m_is_active)
     {
         Deactivate(true);
     }
 }
Esempio n. 2
0
        private void ScheduleTimers()
        {
            FixPoint time_remaining = m_definition_component.GetLowestCountdownTimerRemaining();

            if (time_remaining <= FixPoint.Zero)
            {
                time_remaining = FixPoint.PrecisionFP;
            }
            var task_scheduler = GetLogicWorld().GetTaskScheduler();

            if (m_task == null)
            {
                m_task = LogicTask.Create <SkillCountdownTask>();
                m_task.Construct(this);
            }
            task_scheduler.Schedule(m_task, GetCurrentTime(), time_remaining);
        }