summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFlavio Salvador López Orellana <[email protected]>2019-09-06 18:31:26 -0400
committerGitHub <[email protected]>2019-09-06 18:31:26 -0400
commit2436511e4f7909821da06e9ec77d7e0c0c6afc57 (patch)
treefeb8d48854a11a90f8cc92a86360e935a59f2682
parent220c3f0ed4a323d5d7e354c7f1b7ff1e8b16c4e9 (diff)
downloaddragonruby-game-toolkit-contrib-2436511e4f7909821da06e9ec77d7e0c0c6afc57.tar.gz
dragonruby-game-toolkit-contrib-2436511e4f7909821da06e9ec77d7e0c0c6afc57.zip
Improved what key_up, key_down, and key_held do.
Improved what key_up, key_down, and key_held do, at least I hope so.
-rw-r--r--deploy_template/mygame/documentation/06-keyboard.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/deploy_template/mygame/documentation/06-keyboard.md b/deploy_template/mygame/documentation/06-keyboard.md
index 33c9312..aa32a93 100644
--- a/deploy_template/mygame/documentation/06-keyboard.md
+++ b/deploy_template/mygame/documentation/06-keyboard.md
@@ -1,14 +1,14 @@
# Keyboard
-Determining if a key was down:
+Determining if `a` key is in the down state (pressed). This happens once each time the key is pressed:
```
if args.inputs.keyboard.key_down.a
- puts 'The key was in the down state'
+ puts 'The key is pressed'
end
```
-Determining if a key is being held:
+Determining if a key is being held. This happens every tick while the key is held down:
```
if args.inputs.keyboard.key_held.a
@@ -20,15 +20,15 @@ Determining if a key is in the down state or is being held:
```
if args.inputs.keyboard.a
- puts 'The key is being held'
+ puts 'The key is pressed or being held'
end
```
-Determining if a key is released:
+Determining if a key is in the up state (released). This happens once each time the key is released:
```
if args.inputs.keyboard.key_up.a
- puts 'The key is being held'
+ puts 'The key is released'
end
```