godot/demos/2d/dynamic_collision_shapes/ball.gd
2015-12-09 08:39:12 +01:00

18 lines
211 B
GDScript

extends RigidBody2D
# Member variables
var timeout = 5
func _process(delta):
timeout -= delta
if (timeout < 1):
set_opacity(timeout)
if (timeout < 0):
queue_free()
func _ready():
set_process(true)