summaryrefslogtreecommitdiffhomepage
path: root/deploy_template/mygame/documentation
diff options
context:
space:
mode:
authorAmir Rajan <[email protected]>2019-09-06 20:16:02 -0500
committerGitHub <[email protected]>2019-09-06 20:16:02 -0500
commite6240c983f2fdb56ab55cd6a653361e38c53297f (patch)
tree55b455446cbdf837290cc6735844af0af85aace0 /deploy_template/mygame/documentation
parent3275989cb90e310e7a6f692be00a3ceee4157b6d (diff)
parent2436511e4f7909821da06e9ec77d7e0c0c6afc57 (diff)
downloaddragonruby-game-toolkit-contrib-e6240c983f2fdb56ab55cd6a653361e38c53297f.tar.gz
dragonruby-game-toolkit-contrib-e6240c983f2fdb56ab55cd6a653361e38c53297f.zip
Merge pull request #2 from StardragonEX/master
Improved what key_up, key_down, and key_held say it do.
Diffstat (limited to 'deploy_template/mygame/documentation')
-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 8f485cf..6fbe6d2 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
```