First_Person_Slapper/Scenes/LevelTest.gd
MarcEricMartel c573c03d37 LevelTut2
2022-10-12 11:09:47 -04:00

24 lines
486 B
GDScript3

extends Spatial
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
onready var Enemies = [ $Enemy, $Enemy2 ]
var isWinner = false
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
isWinner = true
for Enemy in Enemies:
if !Enemy.isDead:
isWinner = false
if isWinner:
get_tree().quit()