silphius/app/ecs/systems/kill-perishable.js
2024-07-30 09:56:53 -05:00

18 lines
270 B
JavaScript

import {System} from '@/ecs/index.js';
export default class KillPerishable extends System {
static queries() {
return {
default: ['Ttl'],
};
}
tick(elapsed) {
for (const {Ttl} of this.select('default')) {
Ttl.tick(elapsed);
}
}
}