30 lines
571 B
GDScript3
30 lines
571 B
GDScript3
extends Spatial
|
|
|
|
|
|
# Declare member variables here. Examples:
|
|
# var a = 2
|
|
# var b = "text"
|
|
var enemycount = 2
|
|
onready var NEXTSCENE = "res://Test_Scene.tscn"
|
|
|
|
onready var WinMess = $Messages/Win
|
|
onready var EndTimer = $End
|
|
|
|
onready var HUD = $"Player/HUD/MenuLayer/Start"
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
pass # Replace with function body.
|
|
|
|
|
|
func _on_Enemy_dying():
|
|
enemycount -= 1
|
|
if enemycount == 0:
|
|
WinMess.show()
|
|
EndTimer.start()
|
|
HUD.ingame = false
|
|
|
|
|
|
func _on_Win_timeout():
|
|
get_tree().change_scene(NEXTSCENE)
|
|
|