2015-09-16 03:07:03 +02:00
|
|
|
|
|
|
|
extends RigidBody2D
|
|
|
|
|
2015-11-21 16:13:43 +01:00
|
|
|
# Member variables
|
|
|
|
var timeout = 5
|
2015-09-16 03:07:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
func _process(delta):
|
2015-11-21 16:13:43 +01:00
|
|
|
timeout -= delta
|
|
|
|
if (timeout < 1):
|
2015-09-16 03:07:03 +02:00
|
|
|
set_opacity(timeout)
|
2015-11-21 16:13:43 +01:00
|
|
|
if (timeout < 0):
|
2015-09-16 03:07:03 +02:00
|
|
|
queue_free()
|
|
|
|
|
|
|
|
|
2015-11-21 16:13:43 +01:00
|
|
|
func _ready():
|
|
|
|
set_process(true)
|