15 lines
308 B
GDScript
15 lines
308 B
GDScript
extends Sprite3D
|
|
class_name EnergyBar3D
|
|
|
|
@onready var bar : ProgressBar = $SubViewport/EnergyBar2D
|
|
|
|
func _ready() -> void:
|
|
texture = $SubViewport.get_texture()
|
|
|
|
|
|
func set_up(value : int, max_amount : int) -> void:
|
|
bar.setup_bar(value, max_amount)
|
|
|
|
|
|
func update(value : int) -> void:
|
|
bar.update_bar(value)
|