2025-06-05 15:35:19 +02:00
|
|
|
extends Sprite3D
|
|
|
|
|
class_name EnergyBar3D
|
|
|
|
|
|
|
|
|
|
@onready var bar : ProgressBar = $SubViewport/EnergyBar2D
|
|
|
|
|
|
|
|
|
|
func _ready() -> void:
|
|
|
|
|
texture = $SubViewport.get_texture()
|
|
|
|
|
|
|
|
|
|
|
2025-06-18 12:19:43 +02:00
|
|
|
func set_max_value(max_value : int) -> void:
|
|
|
|
|
bar.max_value = max_value
|
|
|
|
|
|
|
|
|
|
|
2025-06-05 15:35:19 +02:00
|
|
|
func set_up(value : int, max_amount : int) -> void:
|
|
|
|
|
bar.setup_bar(value, max_amount)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func update(value : int) -> void:
|
|
|
|
|
bar.update_bar(value)
|