CR-002/CR-003: Gauntlet als vertikaler Kletter-Parcours mit 5 Ascents, ohne Wind
- Gauntlet komplett neu: fuenf Ascent-Sub-Scenes an der Felswand (Fuss bis Box-Canyon ~38 m), verbunden ueber schulterbreite Kies-Pfade (Training: Checkpoint/Rast, Ernstlauf: Durchgang); Nebel, KillZone, Treppen-Visual, 4 Drachen-Silhouetten am Box-Canyon-Eingang - 10 wiederverwendbare Hindernis-Scenes: spinning_log, granite_pillar, spinning_wheel (Ausstiegs-Timing), buoy_ball (momentum_swing: laden + im Scheitel loslassen), iron_rail (A/D- bzw. LB/RB-Wechsel-Hangeln), shaking_pillar, rolling_log (Tempo-Pflicht, Quetsch-Tod, No-Rope), leaning_chimney (X-Spreiz-Modus, kein Seil-Behelf), vertical_ramp (Sprint-Momentum), cliff_ledge (bestehendes Kanten-Klettersystem) - Sicherungsseile alle ~6 Fuss: Sturz oeffnet Greif-Fenster (Leertaste/A), Fang = letzter Absatz + 30 s Strafe, sonst Death-State; No-Rope-Zone an den Rolling Logs; Ernstlauf sperrt Absteigen - run_timer (Zeitlauf nur im exam), rival_climbers (5 Kadetten, Sturz-Zeitplan + Kanon-Tod an den Rolling Logs), nerve_system (Rival-Tode/Ablenkung/Blick nach unten verschlechtern Griff; Steady = Strg/L2 senkt Nerven, blockt Klettern), climb_controller (Griff-HUD), gauntlet_mode (training/exam + manipulated-Preset) - CR-003: Wind aus dem Gauntlet entfernt - Drachen-Ablenkung ohne Seitenruck und ohne Gegensteuer-QTE (reines Nerven-Ereignis), balance_qte auf CR-001-Stand zurueck (Wind nur am Viadukt) - Story Phase 4c unangetastet auf neuer Geometrie: Auftakt, Intervention am Sammel-Absatz vor Ascent 5, Marens Tod, Wahrheiten, Trauer-Wahl; erster Besuch = manipulierter Ernstlauf, danach freies Training; story_hook_reached(ascent_index) als Anker fuer den Story-CR - neue Input-Actions steady/swing_charge/grab_rope/hangel_left/ hangel_right/look_down; Tuning daten-getrieben unter data/gauntlet/ (gauntlet_tuning.tres + ascent_1..5.tres) - Verifikation: Headless-Sonde 91/97 gruen (Rest: Buoy-Folgefehler, Fix umgesetzt, Bestaetigungslauf auf Wunsch uebersprungen); Boot-Check aller 6 Szenen fehlerfrei Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
1d8d3bc342
commit
6f92fc0ae0
66 changed files with 2661 additions and 304 deletions
153
scripts/gameplay/obstacles/obstacle_base.gd
Normal file
153
scripts/gameplay/obstacles/obstacle_base.gd
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
class_name GauntletObstacle
|
||||
extends Node3D
|
||||
## Basisklasse aller Gauntlet-Hindernisse (CR-002).
|
||||
##
|
||||
## Liefert die gemeinsame Infrastruktur: Signale cleared/player_fell,
|
||||
## Greybox-Baukasten für Boxen, Zylinder und Trigger-Areas, Zugriff auf
|
||||
## den Spieler sowie einen Bildschirm-Prompt (Tastatur- UND
|
||||
## Controller-Glyphe als Text, solange InputPrompts noch Skelett ist).
|
||||
## Hindernisse registrieren sich in der Gruppe gauntlet_obstacle; die
|
||||
## Szenen-Steuerung injiziert über setup_context Nerven-System und Modus.
|
||||
|
||||
signal cleared(obstacle_id: String)
|
||||
signal player_fell(source_id: String)
|
||||
|
||||
@export var obstacle_id := ""
|
||||
|
||||
var nerve: Node
|
||||
var mode: Node
|
||||
var _is_cleared := false
|
||||
var _prompt_layer: CanvasLayer
|
||||
var _prompt_label: Label
|
||||
|
||||
|
||||
## Registriert das Hindernis für die Kontext-Injektion der Szene.
|
||||
func _ready() -> void:
|
||||
add_to_group("gauntlet_obstacle")
|
||||
|
||||
|
||||
## Bekommt Nerven-System und Gauntlet-Modus von der Szene gereicht.
|
||||
func setup_context(nerve_system: Node, gauntlet_mode: Node) -> void:
|
||||
nerve = nerve_system
|
||||
mode = gauntlet_mode
|
||||
|
||||
|
||||
## Meldet das Hindernis einmalig als geschafft.
|
||||
func mark_cleared() -> void:
|
||||
if _is_cleared:
|
||||
return
|
||||
_is_cleared = true
|
||||
cleared.emit(obstacle_id)
|
||||
|
||||
|
||||
## Meldet einen Sturz des Spielers an diesem Hindernis.
|
||||
func report_fall() -> void:
|
||||
player_fell.emit(obstacle_id)
|
||||
|
||||
|
||||
## Liefert den Spieler oder null.
|
||||
func get_player() -> CharacterBody3D:
|
||||
return get_tree().get_first_node_in_group("player") as CharacterBody3D
|
||||
|
||||
|
||||
## Prüft, ob der Spieler gerade frei steuerbar ist (kein Dialog, kein
|
||||
## anderes Set-Piece hält ihn fest).
|
||||
func is_player_free(player: CharacterBody3D) -> bool:
|
||||
return player != null and not DialogueSystem.is_dialogue_active and not player.is_control_locked()
|
||||
|
||||
|
||||
## Baut eine begehbare Greybox-Box (Kollision + Mesh) als Kind von parent.
|
||||
func build_box(parent: Node3D, box_size: Vector3, local_position: Vector3, color: Color) -> StaticBody3D:
|
||||
var body := StaticBody3D.new()
|
||||
body.position = local_position
|
||||
var shape := CollisionShape3D.new()
|
||||
var box := BoxShape3D.new()
|
||||
box.size = box_size
|
||||
shape.shape = box
|
||||
body.add_child(shape)
|
||||
body.add_child(build_box_mesh(box_size, Vector3.ZERO, color))
|
||||
parent.add_child(body)
|
||||
return body
|
||||
|
||||
|
||||
## Baut ein reines Box-Mesh ohne Kollision (Deko/Silhouetten).
|
||||
func build_box_mesh(box_size: Vector3, local_position: Vector3, color: Color) -> MeshInstance3D:
|
||||
var mesh_instance := MeshInstance3D.new()
|
||||
var mesh := BoxMesh.new()
|
||||
mesh.size = box_size
|
||||
mesh.material = _make_material(color)
|
||||
mesh_instance.mesh = mesh
|
||||
mesh_instance.position = local_position
|
||||
return mesh_instance
|
||||
|
||||
|
||||
## Baut ein Zylinder-Mesh ohne Kollision (rotierende Stämme, Räder).
|
||||
func build_cylinder_mesh(radius: float, height: float, local_position: Vector3, color: Color) -> MeshInstance3D:
|
||||
var mesh_instance := MeshInstance3D.new()
|
||||
var mesh := CylinderMesh.new()
|
||||
mesh.top_radius = radius
|
||||
mesh.bottom_radius = radius
|
||||
mesh.height = height
|
||||
mesh.material = _make_material(color)
|
||||
mesh_instance.mesh = mesh
|
||||
mesh_instance.position = local_position
|
||||
return mesh_instance
|
||||
|
||||
|
||||
## Baut eine Trigger-Area mit Box-Shape, die nur den Spieler (Layer 2)
|
||||
## erkennt.
|
||||
func build_area(parent: Node3D, box_size: Vector3, local_position: Vector3) -> Area3D:
|
||||
var area := Area3D.new()
|
||||
area.collision_layer = 0
|
||||
area.collision_mask = 2
|
||||
area.position = local_position
|
||||
var shape := CollisionShape3D.new()
|
||||
var box := BoxShape3D.new()
|
||||
box.size = box_size
|
||||
shape.shape = box
|
||||
area.add_child(shape)
|
||||
parent.add_child(area)
|
||||
return area
|
||||
|
||||
|
||||
## Zeigt einen zentrierten Bildschirm-Prompt (baut die UI beim ersten
|
||||
## Aufruf lazy auf).
|
||||
func show_prompt(text: String) -> void:
|
||||
if _prompt_label == null:
|
||||
_build_prompt_ui()
|
||||
_prompt_label.text = text
|
||||
_prompt_label.visible = true
|
||||
|
||||
|
||||
## Blendet den Bildschirm-Prompt aus.
|
||||
func hide_prompt() -> void:
|
||||
if _prompt_label != null:
|
||||
_prompt_label.visible = false
|
||||
|
||||
|
||||
## Baut die Prompt-UI (CanvasLayer + Label, unteres Drittel).
|
||||
func _build_prompt_ui() -> void:
|
||||
_prompt_layer = CanvasLayer.new()
|
||||
_prompt_layer.layer = 3
|
||||
var root := Control.new()
|
||||
root.set_anchors_preset(Control.PRESET_FULL_RECT)
|
||||
root.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
_prompt_label = Label.new()
|
||||
_prompt_label.set_anchors_preset(Control.PRESET_CENTER_BOTTOM)
|
||||
_prompt_label.position.y -= 140.0
|
||||
_prompt_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
_prompt_label.add_theme_font_size_override("font_size", 30)
|
||||
_prompt_label.add_theme_color_override("font_color", Color(1, 0.85, 0.4))
|
||||
_prompt_label.add_theme_color_override("font_outline_color", Color.BLACK)
|
||||
_prompt_label.add_theme_constant_override("outline_size", 8)
|
||||
_prompt_label.visible = false
|
||||
root.add_child(_prompt_label)
|
||||
_prompt_layer.add_child(root)
|
||||
add_child(_prompt_layer)
|
||||
|
||||
|
||||
## Erstellt ein einfarbiges Greybox-Material.
|
||||
func _make_material(color: Color) -> StandardMaterial3D:
|
||||
var material := StandardMaterial3D.new()
|
||||
material.albedo_color = color
|
||||
return material
|
||||
Loading…
Add table
Add a link
Reference in a new issue