summaryrefslogtreecommitdiff
path: root/client/src/JumpStorm.ts
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-07-20 22:22:26 -0700
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-07-20 22:22:26 -0700
commit619a039942c3c02552f72275634a9f6c0788c570 (patch)
tree43151191c920d0d705db71306f58409e97b60d03 /client/src/JumpStorm.ts
parent72c6c7de12e9833f52bf2d0718d70f044f8ab57e (diff)
downloadjumpstorm-619a039942c3c02552f72275634a9f6c0788c570.tar.gz
jumpstorm-619a039942c3c02552f72275634a9f6c0788c570.zip
very basic websocket setup
Diffstat (limited to 'client/src/JumpStorm.ts')
-rw-r--r--client/src/JumpStorm.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/src/JumpStorm.ts b/client/src/JumpStorm.ts
index 45ea163..d1d1013 100644
--- a/client/src/JumpStorm.ts
+++ b/client/src/JumpStorm.ts
@@ -11,9 +11,16 @@ import {
export class JumpStorm {
private game: Game;
+ private socket: WebSocket;
constructor(ctx: CanvasRenderingContext2D) {
this.game = new Game();
+ this.socket = new WebSocket("ws://localhost:8080");
+
+ this.socket.onopen = () => {
+ this.socket.send("gaming");
+ console.log("OPENED SOCKET");
+ };
[
this.createInputSystem(),