wrap line on long comments

This commit is contained in:
Theis Pieter Hollebeek 2025-10-14 15:28:13 +02:00
parent 86edb2a26f
commit f0b470e5f7

View File

@ -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);
```