public static void RegisterOneShot(WorkScheduler.Task task) { if (WorkScheduler.Instance != null) { WorkScheduler.Instance.registerOneShot(task); } }
public static void UnregisterGlobal(WorkScheduler.Task task) { if (WorkScheduler.Instance != null) { WorkScheduler.Instance.unregisterGlobal(task); } }
public static void Unregister(WorkScheduler.Task task, int token) { if (WorkScheduler.Instance != null) { WorkScheduler.Instance.unregister(task, token); } }
private void unregister(WorkScheduler.Task task, int token) { int num = Mathf.Clamp(token / this.GridSize, 0, this.GridSize - 1); int num2 = Mathf.Clamp(token - num * this.GridSize, 0, this.GridSize - 1); this.schedulers[num, num2].Unregister(task); }
private int register(WorkScheduler.Task task, Vector3 position, bool force) { int num = Mathf.Clamp(this.WorldToGridX(position.x), 0, this.GridSize - 1); int num2 = Mathf.Clamp(this.WorldToGridY(position.z), 0, this.GridSize - 1); this.schedulers[num, num2].Register(task, force); return(num * this.GridSize + num2); }
public void Unregister(WorkScheduler.Task task) { int num = this.tasks.LastIndexOf(task); if (num >= 0) { this.tasks.RemoveAt(num); } }
public bool Contains(WorkScheduler.Task task) { return(this.tasks.Contains(task)); }
private void registerOneShot(WorkScheduler.Task task) { this.oneShotScheduler.Register(task, true); }
private void unregisterGlobal(WorkScheduler.Task task) { this.globalScheduler.Unregister(task); }
public static void RegisterGlobal(WorkScheduler.Task task, bool force = false) { WorkScheduler.CheckConfig(); WorkScheduler.Instance.registerGlobal(task, force); }
private void registerGlobal(WorkScheduler.Task task, bool force) { this.globalScheduler.Register(task, force); }
public static int Register(WorkScheduler.Task task, Vector3 position, bool force = false) { WorkScheduler.CheckConfig(); return(WorkScheduler.Instance.register(task, position, force)); }