15 lines
361 B
GDScript
15 lines
361 B
GDScript
@tool
|
|
extends TextureProgressBar
|
|
|
|
@export var _max_value :float= 0
|
|
@export var _value :float= 0
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
pass # Replace with function body.
|
|
|
|
|
|
func _process(delta: float) -> void:
|
|
_value = clampf(_value,0,_max_value)
|
|
material.set_shader_parameter("value",_value/_max_value)
|
|
pass
|