ajout du détecteur et liaison entre les scènes

This commit is contained in:
2026-02-20 01:00:55 +01:00
parent dc1a6686bc
commit fb8a2da4ff
42 changed files with 737 additions and 418 deletions

View File

@@ -79,12 +79,12 @@ shader_parameter/layer_scale = 20.0
shader_parameter/layer_scale_step = 10.0
shader_parameter/layers_count = 3
[sub_resource type="Sky" id="Sky_65b6a"]
[sub_resource type="Sky" id="Sky_kdvug"]
sky_material = SubResource("ShaderMaterial_mwti2")
[sub_resource type="Environment" id="Environment_lhhy6"]
background_mode = 2
sky = SubResource("Sky_65b6a")
sky = SubResource("Sky_kdvug")
sky_custom_fov = 61.7
ambient_light_source = 3
ambient_light_color = Color(1, 1, 1, 1)
@@ -171,7 +171,7 @@ environment = SubResource("Environment_lhhy6")
[node name="Player3D" parent="." unique_id=549819967 instance=ExtResource("3_4wxm6")]
unique_name_in_owner = true
transform = Transform3D(-1, 0, -1.509958e-07, 0, 1, 0, 1.509958e-07, 0, -1, -51.325, 1, -4.22)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -29.925, 1, 4.22)
[node name="Phone" parent="." unique_id=429299908 instance=ExtResource("4_mwti2")]
unique_name_in_owner = true

View File

@@ -2,6 +2,7 @@
extends Node3D
const INTRO_DIALOG = "res://dialogs/timelines/story/demeter_intro.dtl"
const FAILED_DIALOG = "res://dialogs/timelines/gameplay_related/demeter_astra_failed.dtl"
const ROOM_PART_SCENE := preload("res://stages/3d_scenes/astra_base/room_part.tscn")
const ROOM_END_SCENE := preload("res://stages/3d_scenes/astra_base/assets/3d/astra_base_room_end.blend")
@@ -15,6 +16,8 @@ const LIFT_TIME := 2
@export var room_part_number := 100 : set = set_room_part_number
var chosen_incubator_id := -1
# Cheat Code
func _input(_e):
if (
@@ -32,7 +35,8 @@ func _ready():
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
set_room_part_number()
var new_player_incubator := %Incubators.get_children().pick_random() as Incubator
chosen_incubator_id = randi_range(0, len(%Incubators.get_children()))
var new_player_incubator := %Incubators.get_children()[chosen_incubator_id] as Incubator
new_player_incubator.used = true
%Player3D.position = new_player_incubator.global_position + Vector3.UP
%Player3D.rotation = new_player_incubator.rotation
@@ -42,6 +46,8 @@ func _ready():
%Lift.interactable = true
)
GameInfo.game_data.incubator_used.append(chosen_incubator_id)
story()
@@ -55,7 +61,13 @@ func story():
Dialogic.start(INTRO_DIALOG)
await Dialogic.timeline_ended
else:
%Phone.clicked.connect(
func ():
Dialogic.start(FAILED_DIALOG)
%Phone.interactable = false
)
%LiftAnimationPlayer.play("arrive")
await %Lift.clicked
%LiftAnimationPlayer.play_backwards("arrive")
@@ -85,6 +97,7 @@ func set_room_part_number(_room_part_number : int = room_part_number):
var shifted_origin = Vector3.LEFT * ROOM_PART_SHIFT * room_part_number/2
var incubator_id = 0
for i in range(room_part_number):
var new_room_part := ROOM_PART_SCENE.instantiate() as Node3D
%RoomParts.add_child(new_room_part)
@@ -92,7 +105,9 @@ func set_room_part_number(_room_part_number : int = room_part_number):
for j in range(INCUBATOR_BY_ROOM):
for direction in [-1, 1]:
var new_incubator := INCUBATOR_SCENE.instantiate() as Incubator
new_incubator.used = incubator_id in GameInfo.game_data.incubator_used
%Incubators.add_child(new_incubator)
incubator_id += 1
new_incubator.position = (
new_room_part.position
+ j * Vector3.LEFT * (ROOM_PART_SHIFT / INCUBATOR_BY_ROOM)

View File

@@ -8,7 +8,7 @@ func _ready():
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
await %Phone.clicked
Dialogic.start_timeline(OUTRO_TIMELINE_PATH)
Dialogic.start(OUTRO_TIMELINE_PATH)
await Dialogic.timeline_ended
%Credits.show()

View File

@@ -1,6 +1,13 @@
extends Node3D
const DIALOG_PATH = "res://dialogs/timelines/story/demeter_ship_presentation.dtl"
# Called when the node enters the scene tree for the first time.
func _ready():
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
%Phone.play_audio()
await %Phone.clicked
Dialogic.start(DIALOG_PATH)
await Dialogic.timeline_ended
SceneManager.change_to_scene_id("COCKPIT")

View File

@@ -147,4 +147,5 @@ omni_range = 21.258795
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.37195766, 2.8968668, -0.44411802)
[node name="Phone" parent="." unique_id=429299908 instance=ExtResource("7_dkh4e")]
unique_name_in_owner = true
transform = Transform3D(-0.83126587, 0, -0.555875, 0, 1, 0, 0.555875, 0, -0.83126587, -4.110002, 1.6397171, 6.610814)