LevelTut2
This commit is contained in:
23
Scenes/LevelTest.gd
Normal file
23
Scenes/LevelTest.gd
Normal 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()
|
||||
Reference in New Issue
Block a user