summaryrefslogtreecommitdiff
path: root/demos/2d/dynamic_collision_shapes/ball.gd
blob: 169079ea4679a04452a01b5b0068647c78b269eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

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)