1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-29 23:41:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Statemachine/ItemShow.gd
T
fallingshrimp 4a66374e24 Add UI components for Feed and Item displays, including SVG resources
- Introduced FeedCard and FieldShow scenes with corresponding GDScript files for managing feed and item display.
- Added SVG resources for banana and baseball items.
- Updated ItemStore to include mappings for item types and names in Chinese.
- Enhanced FieldShow and ItemShow scripts to dynamically update UI elements based on exported properties.
- Implemented a new Feed class for structured feed data handling.
2025-08-26 18:09:04 +08:00

13 lines
360 B
GDScript

@tool
extends HBoxContainer
@export var type: ItemStore.ItemType = ItemStore.ItemType.BASEBALL
@export var count: int = 0
@onready var avatarTexture: TextureRect = $"%avatar"
@onready var countLabel: Label = $"%count"
func _process(_delta):
avatarTexture.texture = load("res://resources/items/%s.svg" % ItemStore.idMap[type])
countLabel.text = str(count)