void DeleteLocomotorSpeedRateTask() { if (m_update_locomotor_speed_rate_task == null) { return; } m_update_locomotor_speed_rate_task.Cancel(); LogicTask.Recycle(m_update_locomotor_speed_rate_task); m_update_locomotor_speed_rate_task = null; }
void StartLocomotorSpeedRateTask() { if (m_update_locomotor_speed_rate_task != null) { return; } var schedeler = GetLogicWorld().GetTaskScheduler(); if (schedeler == null) { return; //ZZWTOOD 世界销毁的时候 } m_update_locomotor_speed_rate_task = LogicTask.Create <UpdateLocomotorSpeedRateTask>(); m_update_locomotor_speed_rate_task.Construct(this); schedeler.Schedule(m_update_locomotor_speed_rate_task, GetCurrentTime(), FixPoint.PrecisionFP); }