diff options
Diffstat (limited to 'demos/2d/dynamic_collision_shapes/ball.gd')
-rw-r--r-- | demos/2d/dynamic_collision_shapes/ball.gd | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/demos/2d/dynamic_collision_shapes/ball.gd b/demos/2d/dynamic_collision_shapes/ball.gd index c17b20f9c8..169079ea46 100644 --- a/demos/2d/dynamic_collision_shapes/ball.gd +++ b/demos/2d/dynamic_collision_shapes/ball.gd @@ -1,21 +1,17 @@ extends RigidBody2D -# member variables here, example: -# var a=2 -# var b="textvar" +# Member variables +var timeout = 5 -var timeout=5 func _process(delta): - timeout-=delta - if (timeout<1): + timeout -= delta + if (timeout < 1): set_opacity(timeout) - if (timeout<0): + if (timeout < 0): queue_free() -func _ready(): - set_process(true) - # Initialization here - pass +func _ready(): + set_process(true) |