Files
MisguidedLaunch/scripts/cargo_item.gd
Eric Vande Voort 7eb0dea424 init
2025-01-07 16:10:03 -06:00

13 lines
338 B
GDScript

extends PanelContainer
class_name CargoItem
@onready var item_texture: TextureRect = %ItemTexture
@onready var item_label: Label = %ItemLabel
func init(type: String, count: int):
item_texture.texture = DataHandler.type_to_texture(type)
item_label.text = "x%s" % count
func update_count(count: int):
item_label.text = "x%s" % count