public void AddTask(long key, LocationTask task) { if (!this.taskQueues.TryGetValue(key, out EQueue <LocationTask> tasks)) { tasks = new EQueue <LocationTask>(); this.taskQueues[key] = tasks; } task.Scene = this.GetEntity <Scene>(); tasks.Enqueue(task); }