4
0
Fork 0
WolfBox/scripts/team_card.gd

23 lines
544 B
GDScript3
Raw Normal View History

2025-06-21 14:36:09 +01:00
@tool
extends Card
class_name TeamCard
@export var team: Team:
set(val):
if team != null:
team.disconnect("changed", update)
team = val
team.connect("changed", update)
update()
func _ready() -> void:
update()
func update() -> void:
if team == null:
return
$"RootMover/Card Front/VBoxContainer/RoleName".text = team.name
$"RootMover/Card Front/VBoxContainer/RoleDescription".text = "[center]" + team.description + "[/center]"
show_postit(!team.postit.is_empty())
$"RootMover/Card Front/PostIt/Label".text = team.postit