summaryrefslogtreecommitdiff
path: root/client/src
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-08-12 13:49:16 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-08-12 13:49:16 -0600
commitc6e9baa0009f7cce0f6ff156a3957ef04a8cb684 (patch)
tree9766a4a33ad1c86aa71a5f92daf8917f3e5f5eed /client/src
parentb67ffb57c1bf6e9628339a3f43c71ccebdb46136 (diff)
downloadjumpstorm-c6e9baa0009f7cce0f6ff156a3957ef04a8cb684.tar.gz
jumpstorm-c6e9baa0009f7cce0f6ff156a3957ef04a8cb684.zip
the great engine refactor
Diffstat (limited to 'client/src')
-rw-r--r--client/src/JumpStorm.ts7
-rw-r--r--client/src/components/GameCanvas.svelte2
-rw-r--r--client/src/components/LeaderBoard.svelte3
-rw-r--r--client/src/components/LeaderBoardCard.svelte4
4 files changed, 4 insertions, 12 deletions
diff --git a/client/src/JumpStorm.ts b/client/src/JumpStorm.ts
index d1d1013..bd48483 100644
--- a/client/src/JumpStorm.ts
+++ b/client/src/JumpStorm.ts
@@ -17,11 +17,6 @@ export class JumpStorm {
this.game = new Game();
this.socket = new WebSocket("ws://localhost:8080");
- this.socket.onopen = () => {
- this.socket.send("gaming");
- console.log("OPENED SOCKET");
- };
-
[
this.createInputSystem(),
new FacingDirection(),
@@ -32,7 +27,7 @@ export class JumpStorm {
].forEach((system) => this.game.addSystem(system));
[new Floor(160), new Player()].forEach((entity) =>
- this.game.addEntity(entity)
+ this.game.addEntity(entity),
);
}
diff --git a/client/src/components/GameCanvas.svelte b/client/src/components/GameCanvas.svelte
index d7abecf..ae8c1b0 100644
--- a/client/src/components/GameCanvas.svelte
+++ b/client/src/components/GameCanvas.svelte
@@ -1,7 +1,7 @@
<script lang="ts">
import { onMount } from "svelte";
import { loadAssets } from "@engine/config";
- import { JumpStorm} from "../Jumpstorm";
+ import { JumpStorm } from "../JumpStorm";
let canvas: HTMLCanvasElement;
let ctx: CanvasRenderingContext2D;
diff --git a/client/src/components/LeaderBoard.svelte b/client/src/components/LeaderBoard.svelte
index 880e64a..8343c56 100644
--- a/client/src/components/LeaderBoard.svelte
+++ b/client/src/components/LeaderBoard.svelte
@@ -1,10 +1,9 @@
<script lang="ts">
- import { type LeaderBoardEntry } from "@engine/interfaces";
import LeaderBoardCard from "./LeaderBoardCard.svelte";
const MAX_ENTRIES = 8;
- export let entries: LeaderBoardEntry[] = [];
+ export let entries: { name: string, score: number }[] = [];
</script>
<div class="leaderboard">
diff --git a/client/src/components/LeaderBoardCard.svelte b/client/src/components/LeaderBoardCard.svelte
index f46c000..ae30e1a 100644
--- a/client/src/components/LeaderBoardCard.svelte
+++ b/client/src/components/LeaderBoardCard.svelte
@@ -1,7 +1,5 @@
<script lang="ts">
- import { type LeaderBoardEntry } from "@engine/interfaces";
-
- export let entry: LeaderBoardEntry = {
+ export let entry = {
name: "simponic",
score: 100,
};