* @param {RuntimeScene} runtimeScene
(runtimeScene)
| 45 | * @param {RuntimeScene} runtimeScene |
| 46 | */ |
| 47 | processTasks(runtimeScene) { |
| 48 | for (const task of this.tasks.keys()) { |
| 49 | if (task.update(runtimeScene)) { |
| 50 | // The task has finished, run the callback and remove it. |
| 51 | this.tasks.get(task)(runtimeScene); |
| 52 | this.tasks.delete(task); |
| 53 | } |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * @param {FakeAsyncTask} task The {@link AsyncTask} to run. |