mirror of
https://github.com/SEISYUNLie/Platform-Jump.git
synced 2026-10-26 19:01:10 +08:00
Initial commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
extends HBoxContainer
|
||||
|
||||
@export var full_texture: Texture2D
|
||||
@export var empty_texture: Texture2D
|
||||
@export var max_health: int = 5
|
||||
|
||||
func update_health(current_health: int):
|
||||
for i in range(get_child_count()):
|
||||
var icon = get_child(i) as TextureRect
|
||||
if i < current_health:
|
||||
icon.texture = full_texture
|
||||
else:
|
||||
icon.texture = empty_texture
|
||||
Reference in New Issue
Block a user