extends Spatial var enemycount = 1 onready var NEXTSCENE = "res://Levels/Level07.tscn" onready var WinMess = $Messages/Win onready var EndTimer = $End onready var FirstTime = $Timer onready var Eye = $RayCast onready var player = $Player onready var balls = $"Player/HUD/PlayerLayer/ActualHUD/Balls" onready var rem = $"Player/HUD/PlayerLayer/ActualHUD/Remaining" func _ready(): FirstTime.start() balls.hide() rem.hide() func _process(delta): Eye.look_at(player.transform.origin, Vector3.UP) func _on_Enemy_dying(): enemycount -= 1 if enemycount == 0: WinMess.show() EndTimer.start() func _on_Win_timeout(): get_tree().change_scene(NEXTSCENE)