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

Add new styleboxes and import energy texture

- Created a new SVG import for the energy texture, enabling better resource management and compression.
- Added a StyleBoxFlat resource for the top left panel with specified margins, background color, border width, and corner radius.
- Introduced a StyleBoxFlat resource for the top panel with similar properties, ensuring consistent UI design across panels.
This commit is contained in:
2025-08-27 11:08:11 +08:00
parent 0648ed75d0
commit b3b4fdafc2
10 changed files with 144 additions and 41 deletions
+6 -3
View File
@@ -4,6 +4,8 @@ class_name UIState
@onready var baseball = $"%baseball"
@onready var basketball = $"%basketball"
@onready var apple = $"%apple"
@onready var items = $"%items"
@onready var energy = $"%energy"
static var player: EntityBase = null
static var bossbar: EntityStateBar
@@ -17,9 +19,10 @@ 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]
apple.count = player.inventory[ItemStore.ItemType.APPLE]
energy.text = "%.1f"%player.energy
for i in items.get_children():
var item = i as ItemShow
item.count = player.inventory.get(item.type)
if currentPanel:
WorldManager.rootNode.process_mode = Node.PROCESS_MODE_DISABLED
else: