From c756d6de95cf2b89be59ba41ac64bb01fb3acbee Mon Sep 17 00:00:00 2001 From: Theis Pieter Hollebeek Date: Mon, 13 Oct 2025 11:30:10 +0200 Subject: [PATCH] fix goofy formatting of md --- docs/gamelib.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/gamelib.md b/docs/gamelib.md index f215dfb..1c242da 100644 --- a/docs/gamelib.md +++ b/docs/gamelib.md @@ -57,10 +57,8 @@ lib.onPress("a", function () { function dWasPressed() { playerX += 20; } -lib.onPress( - "a", - dWasPressed, -); /* note the lack of () after dWasPressed - we are not calling the function, we are referring to it as a variable */ +// note the lack of () after dWasPressed - we are not calling the function, we are referring to it as a variable +lib.onPress("a", dWasPressed); ``` ### `LoopFunc` @@ -97,9 +95,8 @@ lib.startGameLoop(function (deltaT) { function loopFunction(deltaTime) { playerX += 20 * deltaTime; } -lib.startGameFunction( - loopFunction, -); /* note the lack of () after loopFunction - we are not calling the function, we are using it as a variable */ +// note the lack of () after loopFunction - we are not calling the function, we are using it as a variable +lib.startGameFunction(loopFunction); ``` ## Functions @@ -157,6 +154,7 @@ Example: ```ts let isJumping = false; + lib.onPress(" ", function () { isJumping = true; });