Skip to content

Commit

Permalink
A few updates
Browse files Browse the repository at this point in the history
  • Loading branch information
buserp committed Dec 24, 2024
1 parent bc62bc9 commit c7735f7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# This is my computer's Tailscale address, you can substitute your own
SOCKET_URL="http://paul14s:3000"
SOCKET_URL="http://localhost:3000"
CORS_ORIGIN="*"
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function startGame() {
}
);
blueButton.graphics.anchor.setTo(0.5, 0.5);
blueButton.transform.pos.setTo(ARENA_WIDTH * (3/4), ARENA_HEIGHT / 2);
blueButton.transform.pos.setTo(ARENA_WIDTH * (3 / 4), ARENA_HEIGHT / 2);
const redButton = new JoinButton(
"Join Red",
new Font({
Expand All @@ -170,7 +170,7 @@ function startGame() {
}
);
redButton.graphics.anchor.setTo(0.5, 0.5);
redButton.transform.pos.setTo(ARENA_WIDTH * (1/4), ARENA_HEIGHT/2)
redButton.transform.pos.setTo(ARENA_WIDTH * (1 / 4), ARENA_HEIGHT / 2);
const redScore = new ScoreText(
new Font({
size: 60,
Expand Down
4 changes: 2 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function resetPuck() {
Body.setAngularSpeed(puck, 0);
}

function tick(dt: number) {
const tick: TimerHandler = (dt: number) => {
Engine.update(engine, dt);
if (puck.position.x < 0) {
resetPuck();
Expand All @@ -182,7 +182,7 @@ function tick(dt: number) {
state.players[id].position = playerBody.position;
}
io.emit("updateGameState", state);
}
};

setInterval(tick, TICKRATE_MS);

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
"sourceMap": true, /* Create source map files for emitted JavaScript files. */
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
"outDir": "./dist", /* Specify an output folder for all emitted files. */
Expand Down

0 comments on commit c7735f7

Please sign in to comment.