26 lines
398 B
JavaScript
26 lines
398 B
JavaScript
import {System} from '@/ecs/index.js';
|
|
|
|
export default class RunTickingPromises extends System {
|
|
|
|
static get priority() {
|
|
return {
|
|
phase: 'pre',
|
|
};
|
|
}
|
|
|
|
static queries() {
|
|
return {
|
|
default: ['Ticking'],
|
|
};
|
|
}
|
|
|
|
tick(elapsed) {
|
|
for (const {Ticking} of this.select('default')) {
|
|
if (Ticking.isTicking) {
|
|
Ticking.tick(elapsed);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|