First_Person_Slapper/Levels/Level01.gd

24 lines
417 B
GDScript3
Raw Normal View History

2022-10-12 14:23:06 -04:00
extends Spatial
var enemycount = 1
onready var NEXTSCENE = "res://Levels/Level02.tscn"
onready var WinMess = $Messages/Win
onready var EndTimer = $End
onready var HUD = $"Player/HUD/MenuLayer/Start"
func _ready():
pass # Replace with function body.
func _on_Enemy_dying():
enemycount -= 1
if enemycount == 0:
WinMess.show()
EndTimer.start()
func _on_Win_timeout():
get_tree().change_scene(NEXTSCENE)