ajout d'une gui en 3d, d'un tuto et correction de bug à la pelletée

This commit is contained in:
2026-02-07 00:22:12 +01:00
parent 5722fbb437
commit 3fa84994cd
45 changed files with 885 additions and 321 deletions

View File

@@ -0,0 +1,24 @@
@tool
extends MarginContainer
class_name ObjectivProgressBar
const MAX_PROGRESS_BAR_SCALE = 4.25
const PROGRESS_BAR_WEIGHT = 0.1
@export var progress := 0. : set = set_progress
@export var text := "" :
set(v):
text = v
if is_node_ready():
%ProgressText.text = v
func _ready():
if progress != null:
%ProgressBar.scale.x = progress * MAX_PROGRESS_BAR_SCALE
%ProgressText.text = text
func set_progress(_progress : float):
progress = _progress
if is_node_ready() and progress != null:
%ProgressBar.scale.x = min(1., progress) * MAX_PROGRESS_BAR_SCALE