23 lines
354 B
JavaScript
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;
|
|
}
|
|
}
|
|
|
|
}
|