forked from frero/hsgj25-growth
22 lines
567 B
GDScript
22 lines
567 B
GDScript
extends Control
|
|
|
|
class_name BaseCard
|
|
|
|
@export var behaviors = []
|
|
@export var art: Texture2D
|
|
@export var title = ""
|
|
@export var description = ""
|
|
|
|
func _ready() -> void:
|
|
for behavior in behaviors:
|
|
$Behaviors.add_child(behavior.instantiate())
|
|
|
|
$MarginContainer/VSplitContainer/Art.texture = art
|
|
$MarginContainer/VSplitContainer/VSplitContainer2/Title.text = title
|
|
$MarginContainer/VSplitContainer/VSplitContainer2/Description.text = description
|
|
|
|
func activate(world, activator):
|
|
for behavior in $Behaviors.get_children():
|
|
behavior.activate(world, activator)
|
|
|