extends Node class_name GameLoop @export var turns : int @export var label : Label var current_turns : int = 0 var prev_turn : int = -1 # Called when the node enters the scene tree for the first time. func _ready(): GlobalVariables.gameloop = self func _process(_delta): if current_turns >= turns: label.text = "FINISHED!" if prev_turn != current_turns: prev_turn = current_turns label.text = "Turns Left: " + str(turns - current_turns) GlobalVariables.ai.step()