1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-04 02:37:12 +08:00

feat: 添加掉落物功能,更新饲料和物品显示,重构相关UI组件

This commit is contained in:
2025-08-26 20:46:02 +08:00
parent 417ca71de3
commit 51fc904a6a
20 changed files with 424 additions and 16 deletions
+8
View File
@@ -1,9 +1,17 @@
extends CanvasLayer
class_name UIState
@onready var baseball = $"%baseball"
@onready var basketball = $"%basketball"
static var player: EntityBase = null
static var bossbar: EntityStateBar
func _ready():
bossbar = $"%bossbar"
func _process(_delta):
bossbar.visible = !!bossbar.entity
func _physics_process(_delta):
if is_instance_valid(player):
baseball.count = player.inventory[ItemStore.ItemType.BASEBALL]
basketball.count = player.inventory[ItemStore.ItemType.BASKETBALL]