| 44 | } |
| 45 | |
| 46 | void BehaviorSystem::Execute(TaskGraph* graph) |
| 47 | { |
| 48 | // Copy list of behaviors to update (in case one of them gets disabled during async jobs) |
| 49 | if (BehaviorServiceInstance.UpdateList.Count() == 0) |
| 50 | return; |
| 51 | Behaviors.Clear(); |
| 52 | Behaviors.Add(BehaviorServiceInstance.UpdateList); |
| 53 | |
| 54 | // Schedule work to update all behaviors in async |
| 55 | Function<void(int32)> job; |
| 56 | job.Bind<BehaviorSystem, &BehaviorSystem::Job>(this); |
| 57 | graph->DispatchJob(job, Behaviors.Count()); |
| 58 | } |
| 59 | |
| 60 | bool BehaviorService::Init() |
| 61 | { |
no test coverage detected