jumpstorm/engine/components/Gravity.ts

14 lines
349 B
TypeScript
Raw Permalink Normal View History

2023-08-25 18:48:17 -04:00
import { ComponentNames, Component } from '.';
2023-07-19 23:38:24 -04:00
export class Gravity extends Component {
2023-08-25 18:48:17 -04:00
private static DEFAULT_TERMINAL_VELOCITY = 4.5;
2023-07-19 23:38:24 -04:00
public terminalVelocity: number;
constructor(terminalVelocity?: number) {
super(ComponentNames.Gravity);
this.terminalVelocity =
terminalVelocity ?? Gravity.DEFAULT_TERMINAL_VELOCITY;
}
}