20 lines
410 B
GDScript
20 lines
410 B
GDScript
extends Control
|
|
|
|
func _ready():
|
|
visible = false
|
|
|
|
func win(decontamination_surface : float):
|
|
visible = true
|
|
get_tree().paused = true
|
|
%WinTitle.text = "Score : " + str(roundi(decontamination_surface)) + " m2"
|
|
|
|
func _on_restart_pressed():
|
|
get_tree().reload_current_scene()
|
|
|
|
func _on_quit_pressed():
|
|
get_tree().quit()
|
|
|
|
|
|
func _on_planet_day_limit_exceed(planet : Planet):
|
|
win(planet.decontamination_surface)
|