silphius/app/ecs-systems/reset-forces.js
2024-06-26 07:41:07 -05:00

23 lines
354 B
JavaScript

import {System} from '@/ecs/index.js';
export default class ResetForces extends System {
static get priority() {
return {phase: 'post'};
}
static queries() {
return {
default: ['Forces'],
};
}
tick() {
for (const {Forces} of this.select('default')) {
Forces.impulseX = 0;
Forces.impulseY = 0;
}
}
}