school-game/godot/Rooms/StaffRoom.gd

20 lines
681 B
GDScript3
Raw Normal View History

2022-11-09 12:09:17 +00:00
extends Node2D
@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
game_time.connect("heartbeat", Callable(self, "on_staffroom_heartbeat"))
game_time.connect("season_heartbeat", Callable(self, "on_staffroom_season_heartbeat"))
2022-11-09 12:09:17 +00:00
# Called every frame. 'delta' is the elapsed time since the previous frame.
func on_staffroom_heartbeat():
player_vars.operating_costs += (player_vars.staffroom_operating / 20)
func on_staffroom_season_heartbeat():
pass