mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
14 lines
372 B
GDScript
14 lines
372 B
GDScript
@tool
|
|
extends HBoxContainer
|
|
class_name ItemShow
|
|
|
|
@export var type: ItemStore.ItemType = ItemStore.ItemType.BASEBALL
|
|
@export var count: int = 0
|
|
|
|
@onready var avatarTexture: TextureRect = $"%avatar"
|
|
@onready var countLabel: Label = $"%count"
|
|
|
|
func _ready():
|
|
avatarTexture.texture = load("res://resources/items/%s.svg" % ItemStore.idMap[type])
|
|
countLabel.text = str(count)
|