22 lines
392 B
GDScript
22 lines
392 B
GDScript
extends Area2D
|
|
@onready var timer = $Timer
|
|
@onready var label = $"../CanvasLayer/Control/Label"
|
|
@onready var player = %player
|
|
|
|
func _on_body_entered(body):
|
|
player.shrink()
|
|
player.shrink()
|
|
player.shrink()
|
|
|
|
func _ready():
|
|
timer.start()
|
|
|
|
func _process(delta):
|
|
var x = str(int(timer.time_left))
|
|
label.text = x
|
|
|
|
func _on_timer_timeout():
|
|
player.shrink()
|
|
player.shrink()
|
|
player.shrink()
|