LevelTut2

This commit is contained in:
MarcEricMartel
2022-10-12 11:09:47 -04:00
parent ecbc5dfe50
commit c573c03d37
5 changed files with 163 additions and 18 deletions

23
Scenes/LevelTest.gd Normal file
View File

@@ -0,0 +1,23 @@
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()