22 lines
443 B
GDScript
22 lines
443 B
GDScript
extends Control
|
|
|
|
func _ready():
|
|
visible = false
|
|
|
|
func win(planet : Planet):
|
|
visible = true
|
|
get_tree().paused = true
|
|
%WinTitle.text = "Score : " + str(roundi(planet.decontamination_surface))
|
|
|
|
func _on_restart_pressed():
|
|
GameInfo.game_data.current_planet_data = null
|
|
get_tree().paused = false
|
|
get_tree().reload_current_scene()
|
|
|
|
func _on_quit_pressed():
|
|
get_tree().quit()
|
|
|
|
|
|
func _on_planet_day_limit_exceed(planet : Planet):
|
|
win(planet)
|