init
This commit is contained in:
12
scripts/cargo_item.gd
Normal file
12
scripts/cargo_item.gd
Normal file
@@ -0,0 +1,12 @@
|
||||
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
|
||||
Reference in New Issue
Block a user