15 lines
285 B
GDScript3
15 lines
285 B
GDScript3
|
|
extends Sprite3D
|
||
|
|
|
||
|
|
@onready var bar : ProgressBar = $SubViewport/HealthBar2D
|
||
|
|
|
||
|
|
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)
|