2024-01-27 18:33:33 +00:00
|
|
|
extends Label
|
|
|
|
|
2024-01-27 19:46:22 +00:00
|
|
|
var audience: Array[AudienceMember] = []
|
|
|
|
|
2024-01-27 18:33:33 +00:00
|
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
|
|
func _ready():
|
|
|
|
for seat in get_node("/root/IngameScene/Crowd/Seats").get_children():
|
|
|
|
audience.append(seat.get_node("Person"))
|
|
|
|
|
2024-01-27 19:46:22 +00:00
|
|
|
|
2024-01-27 18:33:33 +00:00
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
|
func _process(delta):
|
|
|
|
var mood = 0
|
|
|
|
for m in audience:
|
|
|
|
mood += m.mood
|
|
|
|
text = str(int(mood))
|