From 2436511e4f7909821da06e9ec77d7e0c0c6afc57 Mon Sep 17 00:00:00 2001 From: Flavio Salvador López Orellana <54491132+StardragonEX@users.noreply.github.com> Date: Fri, 6 Sep 2019 18:31:26 -0400 Subject: 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. --- deploy_template/mygame/documentation/06-keyboard.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'deploy_template/mygame/documentation') 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 ``` -- cgit v1.2.3