blob: e39798521d04d3e6a05b263314b901d9c2d70e74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import type { Force2D } from '../interfaces';
import { Component } from './Component';
import { ComponentNames } from '.';
/**
* A list of forces and torque, (in newtons, and newton-meters respectively)
* to apply on one Physics system update (after which, they are cleared).
*/
export class Forces extends Component {
public forces: Force2D[];
constructor(forces?: Force2D[]) {
super(ComponentNames.Forces);
this.forces = forces ?? [];
}
}
|