summaryrefslogtreecommitdiff
path: root/demos/2d/area_input/input.gd
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2015-12-09 08:49:06 +0100
committerRémi Verschelde <remi@verschelde.fr>2015-12-09 08:49:06 +0100
commitdb9da152765357c5e484792fc5e31a25acbc7616 (patch)
treef58497abcecc0a74d3d12132f134a5e0b279cc24 /demos/2d/area_input/input.gd
parentefbb834936fdc9da9789ad37c9cc61e0b90cda95 (diff)
parent52d515b611ed1f593e23b0adabedbd9fd59dc7db (diff)
Merge pull request #2853 from akien-mga/pr-demos-code-formatting
Improve demos code formatting and update to 2.0
Diffstat (limited to 'demos/2d/area_input/input.gd')
-rw-r--r--demos/2d/area_input/input.gd17
1 files changed, 8 insertions, 9 deletions
diff --git a/demos/2d/area_input/input.gd b/demos/2d/area_input/input.gd
index 3f719fc853..e9cc9f3c1d 100644
--- a/demos/2d/area_input/input.gd
+++ b/demos/2d/area_input/input.gd
@@ -1,16 +1,15 @@
extends Area2D
-#virtual from CollisionObject2D (also available as signal)
+
+# Virtual from CollisionObject2D (also available as signal)
func _input_event(viewport, event, shape_idx):
- #convert event to local coordinates
- if (event.type==InputEvent.MOUSE_MOTION):
- event = make_input_local( event )
+ # Convert event to local coordinates
+ if (event.type == InputEvent.MOUSE_MOTION):
+ event = make_input_local(event)
get_node("label").set_text(str(event.pos))
-
-#virtual from CollisionObject2D (also available as signal)
-func _mouse_exit():
- get_node("label").set_text("")
-
+# Virtual from CollisionObject2D (also available as signal)
+func _mouse_exit():
+ get_node("label").set_text("")