First_Person_Slapper/Scenes/LevelTest.gd

24 lines
486 B
GDScript3
Raw Normal View History

2022-10-12 11:09:47 -04:00
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()