summaryrefslogtreecommitdiff
path: root/engine/systems/Input.ts
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-08-25 16:48:17 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-08-25 16:48:17 -0600
commit773ce84f4bf559337e132edd7fcce02a0a2598fd (patch)
tree5fd0b452b459cc5a5b6a1ed98f2d7b9af950864d /engine/systems/Input.ts
parentdec7b614d895a1b507137e4a96a8999ff63aa179 (diff)
downloadjumpstorm-773ce84f4bf559337e132edd7fcce02a0a2598fd.tar.gz
jumpstorm-773ce84f4bf559337e132edd7fcce02a0a2598fd.zip
prettier formatting
Diffstat (limited to 'engine/systems/Input.ts')
-rw-r--r--engine/systems/Input.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/engine/systems/Input.ts b/engine/systems/Input.ts
index a32ba9a..4a5a3c3 100644
--- a/engine/systems/Input.ts
+++ b/engine/systems/Input.ts
@@ -4,12 +4,12 @@ import {
ComponentNames,
Velocity,
Mass,
- Control,
-} from "../components";
-import { Game } from "../Game";
-import { KeyConstants, PhysicsConstants } from "../config";
-import { Action } from "../interfaces";
-import { System, SystemNames } from ".";
+ Control
+} from '../components';
+import { Game } from '../Game';
+import { KeyConstants, PhysicsConstants } from '../config';
+import { Action } from '../interfaces';
+import { System, SystemNames } from '.';
export class Input extends System {
public clientId: string;
@@ -42,7 +42,7 @@ export class Input extends System {
public update(_dt: number, game: Game) {
game.forEachEntityWithComponent(ComponentNames.Control, (entity) => {
const controlComponent = entity.getComponent<Control>(
- ComponentNames.Control,
+ ComponentNames.Control
);
if (controlComponent.controllableBy != this.clientId) return;
@@ -58,7 +58,7 @@ export class Input extends System {
if (entity.hasComponent(ComponentNames.Jump)) {
const velocity = entity.getComponent<Velocity>(
- ComponentNames.Velocity,
+ ComponentNames.Velocity
).velocity;
const jump = entity.getComponent<Jump>(ComponentNames.Jump);
@@ -78,9 +78,9 @@ export class Input extends System {
entity.getComponent<Forces>(ComponentNames.Forces)?.forces.push({
fCartesian: {
fy: mass * PhysicsConstants.PLAYER_JUMP_ACC,
- fx: 0,
+ fx: 0
},
- torque: 0,
+ torque: 0
});
}
}