summaryrefslogtreecommitdiff
path: root/demos/2d/dynamic_collision_shapes/ball.gd
diff options
context:
space:
mode:
Diffstat (limited to 'demos/2d/dynamic_collision_shapes/ball.gd')
-rw-r--r--demos/2d/dynamic_collision_shapes/ball.gd21
1 files changed, 21 insertions, 0 deletions
diff --git a/demos/2d/dynamic_collision_shapes/ball.gd b/demos/2d/dynamic_collision_shapes/ball.gd
new file mode 100644
index 0000000000..c17b20f9c8
--- /dev/null
+++ b/demos/2d/dynamic_collision_shapes/ball.gd
@@ -0,0 +1,21 @@
+
+extends RigidBody2D
+
+# member variables here, example:
+# var a=2
+# var b="textvar"
+
+var timeout=5
+
+func _process(delta):
+ timeout-=delta
+ if (timeout<1):
+ set_opacity(timeout)
+ if (timeout<0):
+ queue_free()
+func _ready():
+ set_process(true)
+ # Initialization here
+ pass
+
+