diff --git a/docs/src/gamelib/index.md b/docs/src/gamelib/index.md index 46ae491..bf28072 100644 --- a/docs/src/gamelib/index.md +++ b/docs/src/gamelib/index.md @@ -91,7 +91,9 @@ lib.onClick(function () { function leftMouseWasPressed() { playerX += 20; } -// note the lack of () after leftMouseWasPressed - we are not calling the function, we are referring to it as a variable +/* note the lack of () after leftMouseWasPressed - + we are not calling the function, we are + referring to it as a variable */ lib.onClick(leftMouseWasPressed, lib.MouseButton.Left); ``` @@ -116,7 +118,9 @@ lib.onPress("a", function () { function dWasPressed() { playerX += 20; } -// 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); ``` @@ -154,7 +158,9 @@ lib.startGameLoop(function (deltaT) { function loopFunction(deltaTime) { playerX += 20 * deltaTime; } -// 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 + referring to it as a variable */ lib.startGameFunction(loopFunction); ```