summaryrefslogtreecommitdiff
path: root/engine/components/Gravity.ts
diff options
context:
space:
mode:
Diffstat (limited to 'engine/components/Gravity.ts')
-rw-r--r--engine/components/Gravity.ts13
1 files changed, 13 insertions, 0 deletions
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;
+ }
+}