fix goofy formatting of md
This commit is contained in:
parent
e86aca5de0
commit
c756d6de95
@ -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;
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user