Updated set_as_action code

Fixed code example using set_as_action.
Issue fixed:
https://github.com/godotengine/godot-docs/issues/2435
This commit is contained in:
Hearto
2019-05-20 18:38:35 -04:00
committed by GitHub
parent 894126a7a6
commit faa17097c3

View File

@@ -185,7 +185,8 @@ The Input singleton has a method for this:
var ev = InputEventAction.new()
# set as move_left, pressed
ev.set_as_action("move_left", true)
ev.action = "move_left"
ev.pressed = true
# feedback
Input.parse_input_event(ev)