modification de la scène de cockpit et ajout de lien entre les scènes

This commit is contained in:
2026-02-19 22:15:38 +01:00
parent fadf0cb769
commit dc1a6686bc
130 changed files with 4131 additions and 1286 deletions

View File

@@ -0,0 +1,22 @@
@tool
extends Node3D
class_name Gauge3D
const MAX_PROGRESS_BAR_SCALE = 4.25
const CYLINDER_HEIGHT = 4.8
@export var progress := 0. : set = set_progress
func _ready():
if progress != null:
%ProgressBar.scale.x = progress * MAX_PROGRESS_BAR_SCALE
func set_progress(_progress : float):
progress = _progress
if is_node_ready() and progress != null:
var capped_progress = max(0.,min(1., progress))
%ProgressBar3D.scale.y = capped_progress * %ProgressBar3D.scale.x
var bar_length = CYLINDER_HEIGHT
%ProgressBar3D.position.z = - bar_length * capped_progress + bar_length
# %ProgressBar.scale.x = max(0.,min(1., progress)) * MAX_PROGRESS_BAR_SCALE