First_Person_Slapper/Levels/Level05.gd
MarcEricMartel ea5f6fb3e8 Compteur
2022-10-12 21:20:58 -04:00

30 lines
534 B
GDScript3

extends Spatial
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
var enemycount = 1
onready var NEXTSCENE = "res://Levels/Level06.tscn"
onready var WinMess = $Messages/Win
onready var EndTimer = $End
onready var balls = $"Player/HUD/PlayerLayer/ActualHUD/Balls"
func _ready():
balls.text = String(enemycount)
func _on_Enemy_dying():
enemycount -= 1
balls.text = String(enemycount)
if enemycount == 0:
WinMess.show()
EndTimer.start()
func _on_Win_timeout():
get_tree().change_scene(NEXTSCENE)