2022-11-09 12:09:17 +00:00
|
|
|
extends Node2D
|
|
|
|
|
2023-03-29 12:32:57 +00:00
|
|
|
@onready var player_vars = get_node("/root/PlayerVariables")
|
|
|
|
@onready var game_time = get_node("/root/GameTimer")
|
2022-11-09 12:09:17 +00:00
|
|
|
|
|
|
|
# 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
|
2023-03-29 12:32:57 +00:00
|
|
|
game_time.connect("heartbeat", Callable(self, "on_classroom_heartbeat"))
|
|
|
|
game_time.connect("season_heartbeat", Callable(self, "on_classroom_season_heartbeat"))
|
2022-11-09 12:09:17 +00:00
|
|
|
|
|
|
|
# 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
|