domingo, 17 de noviembre de 2024

Gdscript Godot 4.3 barra de vida; aumenta por tiempo el valor asta el 100%; Practicas de barra de vida en Godot 4.3;

 extends ProgressBar


# Called when the node enters the scene tree for the first time.

func _ready() -> void:

# Set the initial value of the progress bar

value = 0


# Called every frame. 'delta' is the elapsed time since the previous frame.

func _process(delta: float) -> void:

# Increment the progress bar's value

value += 0.01


# Reset the value when it reaches 100

if value > 100:

value = 0

No hay comentarios:

Publicar un comentario