extends Node2D onready var player_vars = get_node("/root/PlayerVariables") onready var game_time = get_node("/root/GameTimer") # Classroom variables # Called when the node enters the scene tree for the first time. func _ready(): # player_vars.max_pupils += player_vars.pupils_per_classroom game_time.connect("heartbeat", self, "on_classroom_heartbeat") game_time.connect("season_heartbeat", self, "on_classroom_season_heartbeat") # Called every frame. 'delta' is the elapsed time since the previous frame. func on_classroom_heartbeat(): player_vars.operating_costs += (player_vars.classroom_operating / 20) func on_classroom_season_heartbeat(): pass