wrap line on long comments
This commit is contained in:
parent
86edb2a26f
commit
f0b470e5f7
@ -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);
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user