summaryrefslogtreecommitdiff
path: root/engine/components/Gravity.ts
blob: dd6dd2ecb477c039aee98920c72736f2c38ed1ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { ComponentNames, Component } from '.';

export class Gravity extends Component {
  private static DEFAULT_TERMINAL_VELOCITY = 4.5;

  public terminalVelocity: number;

  constructor(terminalVelocity?: number) {
    super(ComponentNames.Gravity);
    this.terminalVelocity =
      terminalVelocity ?? Gravity.DEFAULT_TERMINAL_VELOCITY;
  }
}