From 72c6c7de12e9833f52bf2d0718d70f044f8ab57e Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Thu, 20 Jul 2023 20:47:32 -0700 Subject: a bit of refactoring; importing engine into bun for server --- engine/components/Gravity.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 engine/components/Gravity.ts (limited to 'engine/components/Gravity.ts') diff --git a/engine/components/Gravity.ts b/engine/components/Gravity.ts new file mode 100644 index 0000000..89fcb67 --- /dev/null +++ b/engine/components/Gravity.ts @@ -0,0 +1,13 @@ +import { ComponentNames, Component } from "."; + +export class Gravity extends Component { + private static DEFAULT_TERMINAL_VELOCITY = 5; + + public terminalVelocity: number; + + constructor(terminalVelocity?: number) { + super(ComponentNames.Gravity); + this.terminalVelocity = + terminalVelocity ?? Gravity.DEFAULT_TERMINAL_VELOCITY; + } +} -- cgit v1.2.3-70-g09d2