ajout des graines procédurales et des cinamatiques

This commit is contained in:
2026-02-21 14:29:36 +01:00
parent 2e4a1bab53
commit ca0133bd71
117 changed files with 1238 additions and 590 deletions

View File

@@ -912,7 +912,8 @@ environment = SubResource("Environment_fevne")
[node name="Player3D" parent="." unique_id=549819967 instance=ExtResource("3_c8vcx")]
unique_name_in_owner = true
transform = Transform3D(0.70710677, 0, 0.70710677, 0, 1, 0, -0.70710677, 0, 0.70710677, 20.853506, -5.957883, -2.2161598)
transform = Transform3D(0.25881904, 0, 0.96592593, 0, 1, 0, -0.96592593, 0, 0.25881904, 29.244379, 41.40791, 8.823577)
speed = 5.0
[node name="Phone" parent="." unique_id=429299908 instance=ExtResource("4_fevne")]
unique_name_in_owner = true

View File

@@ -10,5 +10,6 @@ func _ready():
await %Phone.clicked
Dialogic.start(OUTRO_TIMELINE_PATH)
await Dialogic.timeline_ended
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
%Credits.show()

View File

@@ -6,13 +6,12 @@
[ext_resource type="Script" uid="uid://bj4d1x8n8ina" path="res://entities/interactable_3d/interactable_3d.gd" id="1_vlkbw"]
[ext_resource type="PackedScene" uid="uid://cdvegfgvp7053" path="res://stages/3d_scenes/cockpit_scene/assets/3d/furnitures/screen_1.blend" id="2_awdc5"]
[ext_resource type="Texture2D" uid="uid://cgmxjom200bej" path="res://common/icons/chevrons-up.svg" id="2_vlkbw"]
[ext_resource type="Texture2D" uid="uid://be7ietbjlmgtt" path="res://common/icons/map-pin-empty.svg" id="3_cvt2p"]
[ext_resource type="Texture2D" uid="uid://c3f2f1w12afnu" path="res://common/icons/backpack.svg" id="4_cvt2p"]
[ext_resource type="Texture2D" uid="uid://l2xplg72hs6j" path="res://common/icons/map-pin.svg" id="6_qbi61"]
[ext_resource type="Texture2D" uid="uid://bt3g5bmar0icf" path="res://common/icons/growth.svg" id="7_2ofl5"]
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="8_f5peh"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="9_2kujw"]
[ext_resource type="PackedScene" uid="uid://cm5b7w7j6527f" path="res://stages/title_screen/planet_3d.tscn" id="12_stoj6"]
[ext_resource type="Texture2D" uid="uid://bsgmxvuphn73c" path="res://common/icons/arrow-narrow-down.svg" id="13_5d7hc"]
[sub_resource type="ViewportTexture" id="ViewportTexture_cvt2p"]
viewport_path = NodePath("DestinationScreen/SubViewport")
@@ -26,7 +25,7 @@ shading_mode = 0
albedo_color = Color(0.8566341, 0.5852838, 1.1551381e-06, 0.6431373)
[sub_resource type="ViewportTexture" id="ViewportTexture_5d7hc"]
viewport_path = NodePath("NotEnoughEnergyScreen/SubViewport")
viewport_path = NodePath("StatusScreen/SubViewport")
[sub_resource type="SphereShape3D" id="SphereShape3D_vlkbw"]
@@ -74,7 +73,7 @@ _data = {
viewport_path = NodePath("RightScreen/RightScreenAction/SubViewport")
[sub_resource type="ViewportTexture" id="ViewportTexture_f5peh"]
viewport_path = NodePath("RightScreen/RightScreenInfo1/SubViewport")
viewport_path = NodePath("RightScreen/RightScreenStats/SubViewport")
[sub_resource type="LabelSettings" id="LabelSettings_2kujw"]
font = ExtResource("8_f5peh")
@@ -123,7 +122,7 @@ _data = {
viewport_path = NodePath("LeftScreen/LeftScreenAction/SubViewport")
[sub_resource type="ViewportTexture" id="ViewportTexture_2q8cl"]
viewport_path = NodePath("LeftScreen/LeftScreenInfo1/SubViewport")
viewport_path = NodePath("LeftScreen/LeftScreenStats/SubViewport")
[sub_resource type="SphereShape3D" id="SphereShape3D_2kujw"]
@@ -168,12 +167,9 @@ _data = {
script = ExtResource("1_2q8cl")
main_screen_icon = ExtResource("2_vlkbw")
main_screen_label = "Take Off"
right_screen_icon = ExtResource("3_cvt2p")
right_screen_label = "South"
left_screen_icon = ExtResource("4_cvt2p")
left_screen_label = "Backpack"
destination_label = "South"
destination_title_label = "DESTINATION"
status_text = "<null>"
[node name="DestinationScreen" type="Sprite3D" parent="." unique_id=1067303692]
unique_name_in_owner = true
@@ -230,18 +226,18 @@ label_settings = ExtResource("1_sp2xx")
horizontal_alignment = 1
vertical_alignment = 1
[node name="NotEnoughEnergyScreen" type="Sprite3D" parent="." unique_id=1257606535]
[node name="StatusScreen" type="Sprite3D" parent="." unique_id=1257606535]
unique_name_in_owner = true
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1.0000002, 0, 8.742278e-08, 0, -1, 0, 0.8631269, 0.18221188)
modulate = Color(1, 0, 0.43137255, 1)
pixel_size = 0.003
texture = SubResource("ViewportTexture_5d7hc")
[node name="SubViewport" type="SubViewport" parent="NotEnoughEnergyScreen" unique_id=1357189828]
[node name="SubViewport" type="SubViewport" parent="StatusScreen" unique_id=1357189828]
transparent_bg = true
size = Vector2i(500, 70)
[node name="VBoxContainer" type="VBoxContainer" parent="NotEnoughEnergyScreen/SubViewport" unique_id=2076282975]
[node name="VBoxContainer" type="VBoxContainer" parent="StatusScreen/SubViewport" unique_id=2076282975]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
@@ -252,9 +248,9 @@ size_flags_vertical = 4
theme_override_constants/separation = -10
alignment = 1
[node name="NotEnoughEnergyLabel" type="Label" parent="NotEnoughEnergyScreen/SubViewport/VBoxContainer" unique_id=86551380]
[node name="StatusLabel" type="Label" parent="StatusScreen/SubViewport/VBoxContainer" unique_id=86551380]
unique_name_in_owner = true
layout_mode = 2
text = "NOT_ENOUGH_ENEGY"
label_settings = ExtResource("1_sp2xx")
horizontal_alignment = 1
vertical_alignment = 1
@@ -350,29 +346,30 @@ alignment = 1
unique_name_in_owner = true
custom_minimum_size = Vector2(100, 100)
layout_mode = 2
texture = ExtResource("3_cvt2p")
texture = ExtResource("13_5d7hc")
expand_mode = 3
stretch_mode = 5
[node name="RightScreenActionLabel" type="Label" parent="RightScreen/RightScreenAction/SubViewport/VBoxContainer" unique_id=2019588267]
unique_name_in_owner = true
layout_mode = 2
text = "South"
text = "Uqoneso"
label_settings = ExtResource("1_sp2xx")
horizontal_alignment = 1
vertical_alignment = 1
[node name="RightScreenInfo1" type="Sprite3D" parent="RightScreen" unique_id=282782621]
[node name="RightScreenStats" type="Sprite3D" parent="RightScreen" unique_id=282782621]
unique_name_in_owner = true
transform = Transform3D(-1, -5.5879354e-08, 1.1920929e-07, -2.9802322e-08, 0.86602557, -0.50000024, -2.0861626e-07, -0.5000001, -0.86602545, -0.14474958, 0.2707073, -0.057207607)
visible = false
pixel_size = 0.002
texture = SubResource("ViewportTexture_f5peh")
[node name="SubViewport" type="SubViewport" parent="RightScreen/RightScreenInfo1" unique_id=131851122]
[node name="SubViewport" type="SubViewport" parent="RightScreen/RightScreenStats" unique_id=131851122]
transparent_bg = true
size = Vector2i(170, 75)
[node name="HBoxContainer" type="HBoxContainer" parent="RightScreen/RightScreenInfo1/SubViewport" unique_id=578755335]
[node name="HBoxContainer" type="HBoxContainer" parent="RightScreen/RightScreenStats/SubViewport" unique_id=578755335]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
@@ -385,36 +382,40 @@ size_flags_vertical = 4
theme_override_constants/separation = 10
alignment = 1
[node name="RightScreenInfo11" type="VBoxContainer" parent="RightScreen/RightScreenInfo1/SubViewport/HBoxContainer" unique_id=164391708]
[node name="RightScreenStat1" type="VBoxContainer" parent="RightScreen/RightScreenStats/SubViewport/HBoxContainer" unique_id=164391708]
layout_mode = 2
theme_override_constants/separation = -10
[node name="RightScreenInfo11Icon" type="TextureRect" parent="RightScreen/RightScreenInfo1/SubViewport/HBoxContainer/RightScreenInfo11" unique_id=1950512302]
[node name="RightScreenStat1Icon" type="TextureRect" parent="RightScreen/RightScreenStats/SubViewport/HBoxContainer/RightScreenStat1" unique_id=1950512302]
unique_name_in_owner = true
custom_minimum_size = Vector2(50, 50)
layout_mode = 2
texture = ExtResource("7_2ofl5")
expand_mode = 3
stretch_mode = 5
[node name="RightScreenInfo11Label" type="Label" parent="RightScreen/RightScreenInfo1/SubViewport/HBoxContainer/RightScreenInfo11" unique_id=965157290]
[node name="RightScreenStat1Label" type="Label" parent="RightScreen/RightScreenStats/SubViewport/HBoxContainer/RightScreenStat1" unique_id=965157290]
unique_name_in_owner = true
layout_mode = 2
text = "10"
label_settings = SubResource("LabelSettings_2kujw")
horizontal_alignment = 1
vertical_alignment = 1
[node name="RightScreenInfo12" type="VBoxContainer" parent="RightScreen/RightScreenInfo1/SubViewport/HBoxContainer" unique_id=882311617]
[node name="RightScreenStat2" type="VBoxContainer" parent="RightScreen/RightScreenStats/SubViewport/HBoxContainer" unique_id=882311617]
layout_mode = 2
theme_override_constants/separation = -10
[node name="RightScreenInfo12Icon" type="TextureRect" parent="RightScreen/RightScreenInfo1/SubViewport/HBoxContainer/RightScreenInfo12" unique_id=33385693]
[node name="RightScreenStat2Icon" type="TextureRect" parent="RightScreen/RightScreenStats/SubViewport/HBoxContainer/RightScreenStat2" unique_id=33385693]
unique_name_in_owner = true
custom_minimum_size = Vector2(50, 50)
layout_mode = 2
texture = ExtResource("9_2kujw")
expand_mode = 3
stretch_mode = 5
[node name="RightScreenInfo12Label" type="Label" parent="RightScreen/RightScreenInfo1/SubViewport/HBoxContainer/RightScreenInfo12" unique_id=1607645733]
[node name="RightScreenStat2Label" type="Label" parent="RightScreen/RightScreenStats/SubViewport/HBoxContainer/RightScreenStat2" unique_id=1607645733]
unique_name_in_owner = true
layout_mode = 2
text = "10"
label_settings = SubResource("LabelSettings_2kujw")
@@ -464,29 +465,30 @@ alignment = 1
unique_name_in_owner = true
custom_minimum_size = Vector2(100, 100)
layout_mode = 2
texture = ExtResource("4_cvt2p")
texture = ExtResource("13_5d7hc")
expand_mode = 3
stretch_mode = 5
[node name="LeftScreenActionLabel" type="Label" parent="LeftScreen/LeftScreenAction/SubViewport/VBoxContainer" unique_id=1631525309]
unique_name_in_owner = true
layout_mode = 2
text = "Backpack"
text = "Ocaci"
label_settings = ExtResource("1_sp2xx")
horizontal_alignment = 1
vertical_alignment = 1
[node name="LeftScreenInfo1" type="Sprite3D" parent="LeftScreen" unique_id=2023558675]
[node name="LeftScreenStats" type="Sprite3D" parent="LeftScreen" unique_id=2023558675]
unique_name_in_owner = true
transform = Transform3D(0.9999999, -6.3329935e-08, -1.1920929e-07, 0, -0.8660254, -0.50000006, 2.9802322e-08, 0.50000006, -0.86602545, -0.17741072, -0.26158184, 0.06797934)
visible = false
pixel_size = 0.002
texture = SubResource("ViewportTexture_2q8cl")
[node name="SubViewport" type="SubViewport" parent="LeftScreen/LeftScreenInfo1" unique_id=1118622284]
[node name="SubViewport" type="SubViewport" parent="LeftScreen/LeftScreenStats" unique_id=1118622284]
transparent_bg = true
size = Vector2i(170, 75)
[node name="HBoxContainer" type="HBoxContainer" parent="LeftScreen/LeftScreenInfo1/SubViewport" unique_id=324458085]
[node name="HBoxContainer" type="HBoxContainer" parent="LeftScreen/LeftScreenStats/SubViewport" unique_id=324458085]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
@@ -499,36 +501,40 @@ size_flags_vertical = 4
theme_override_constants/separation = 10
alignment = 1
[node name="LeftScreenInfo11" type="VBoxContainer" parent="LeftScreen/LeftScreenInfo1/SubViewport/HBoxContainer" unique_id=224841193]
[node name="LeftScreenStat1" type="VBoxContainer" parent="LeftScreen/LeftScreenStats/SubViewport/HBoxContainer" unique_id=224841193]
layout_mode = 2
theme_override_constants/separation = -10
[node name="LeftScreenInfo11Icon" type="TextureRect" parent="LeftScreen/LeftScreenInfo1/SubViewport/HBoxContainer/LeftScreenInfo11" unique_id=127811144]
[node name="LeftScreenStat1Icon" type="TextureRect" parent="LeftScreen/LeftScreenStats/SubViewport/HBoxContainer/LeftScreenStat1" unique_id=127811144]
unique_name_in_owner = true
custom_minimum_size = Vector2(50, 50)
layout_mode = 2
texture = ExtResource("7_2ofl5")
expand_mode = 3
stretch_mode = 5
[node name="LeftScreenInfo11Label" type="Label" parent="LeftScreen/LeftScreenInfo1/SubViewport/HBoxContainer/LeftScreenInfo11" unique_id=148471301]
[node name="LeftScreenStat1Label" type="Label" parent="LeftScreen/LeftScreenStats/SubViewport/HBoxContainer/LeftScreenStat1" unique_id=148471301]
unique_name_in_owner = true
layout_mode = 2
text = "10"
label_settings = SubResource("LabelSettings_2kujw")
horizontal_alignment = 1
vertical_alignment = 1
[node name="LeftScreenInfo12" type="VBoxContainer" parent="LeftScreen/LeftScreenInfo1/SubViewport/HBoxContainer" unique_id=476423329]
[node name="LeftScreenStat2" type="VBoxContainer" parent="LeftScreen/LeftScreenStats/SubViewport/HBoxContainer" unique_id=476423329]
layout_mode = 2
theme_override_constants/separation = -10
[node name="LeftScreenInfo12Icon" type="TextureRect" parent="LeftScreen/LeftScreenInfo1/SubViewport/HBoxContainer/LeftScreenInfo12" unique_id=2139266172]
[node name="LeftScreenStat2Icon" type="TextureRect" parent="LeftScreen/LeftScreenStats/SubViewport/HBoxContainer/LeftScreenStat2" unique_id=2139266172]
unique_name_in_owner = true
custom_minimum_size = Vector2(50, 50)
layout_mode = 2
texture = ExtResource("9_2kujw")
expand_mode = 3
stretch_mode = 5
[node name="LeftScreenInfo12Label" type="Label" parent="LeftScreen/LeftScreenInfo1/SubViewport/HBoxContainer/LeftScreenInfo12" unique_id=1826154156]
[node name="LeftScreenStat2Label" type="Label" parent="LeftScreen/LeftScreenStats/SubViewport/HBoxContainer/LeftScreenStat2" unique_id=1826154156]
unique_name_in_owner = true
layout_mode = 2
text = "10"
label_settings = SubResource("LabelSettings_2kujw")

View File

@@ -33,6 +33,13 @@ func _ready():
handle_dialogs()
var player_has_teleporter : bool = GameInfo.game_data.player_data.inventory.items.find_custom(
func (i : Item): return i is ShipPortal
) != -1
if not player_has_teleporter:
GameInfo.game_data.player_data.inventory.add_item(ShipPortal.new())
func handle_dialogs():
if not POST_TUTORIAL_DIALOG_PATH in GameInfo.game_data.dialogs_done:
await ring_phone(POST_TUTORIAL_DIALOG_PATH)
@@ -55,12 +62,14 @@ func _on_main_screen_activated():
if GameInfo.game_data.current_run and choosen_run_point:
move_to_choosen_run_point()
land.emit()
%Exit.interactable = true
%Exit.interactable = GameInfo.game_data.current_region_data != null
GameInfo.game_data.ship_in_space = false
else :
take_off.emit()
%Exit.interactable = false
GameInfo.game_data.ship_in_space = true
if GameInfo.game_data.current_run == null:
GameInfo.game_data.start_run()
update_dashboard()
func _on_left_screen_activated():
@@ -74,11 +83,22 @@ func _on_right_screen_activated():
update_dashboard()
func _on_exit_clicked():
if not GameInfo.game_data.ship_in_space:
if not GameInfo.game_data.ship_in_space and GameInfo.game_data.current_region_data != null:
SceneManager.change_to_scene_id('REGION')
func update_dashboard():
var current_region_data = GameInfo.game_data.current_region_data
var current_run = GameInfo.game_data.current_run
var can_take_off : bool = (
current_region_data != null
and current_region_data.state == RegionData.State.SUCCEEDED
and current_run
and len(current_run.next_run_points) != 0
or GameInfo.game_data.current_region_data == null
)
if GameInfo.game_data.ship_in_space:
dashboard.main_screen_icon = LAND_ICON
dashboard.main_screen_label = tr("LAND_SHIP")
@@ -89,28 +109,31 @@ func update_dashboard():
dashboard.destination_title_label = tr("DESTINATION")
dashboard.destination_longitude = float(choosen_run_point.level) / RunData.RUN_POINT_MAX_LEVEL
dashboard.destination_label = choosen_run_point.region_parameter.name
dashboard.status_text = ""
else:
dashboard.status_text = tr("CHOOSE_DESTINATION")
if GameInfo.game_data.current_run:
var next_run_points = GameInfo.game_data.current_run.next_run_points
dashboard.left_screen_interactable = len(next_run_points) > 0
dashboard.right_screen_interactable = len(next_run_points) > 1
if len(next_run_points) > 0:
dashboard.left_screen_icon = RUN_POINT_ICON
dashboard.left_screen_label = next_run_points[0].region_parameter.name
dashboard.left_destination = next_run_points[0]
else:
dashboard.left_destination = null
if len(next_run_points) > 1:
dashboard.right_screen_icon = RUN_POINT_ICON
dashboard.right_screen_label = next_run_points[1].region_parameter.name
dashboard.right_destination = next_run_points[1]
else:
dashboard.right_destination = null
else :
var current_region_data = GameInfo.game_data.current_region_data
dashboard.destination_visible = false
dashboard.main_screen_icon = TAKE_OFF_ICON
dashboard.main_screen_label = tr("TAKE_OFF")
dashboard.main_screen_interactable = current_region_data and current_region_data.state == RegionData.State.SUCCEEDED
dashboard.not_enough_energy = not dashboard.main_screen_interactable
dashboard.main_screen_interactable = can_take_off
dashboard.status_text = "" if can_take_off else tr("NOT_ENOUGH_ENEGY")
dashboard.left_screen_interactable = false
dashboard.right_screen_interactable = false
dashboard.left_destination = null
dashboard.right_destination = null
dashboard.destination_visible = current_region_data != null
if current_region_data:

View File

@@ -35,15 +35,6 @@ func _on_ship_take_off():
func _on_ship_land():
%TakeOffAnimationPlayer.play_backwards("TakeOff")
func _on_map_action_clicked():
SceneManager.change_to_scene_id("REGION_SELECTION")
func _on_exit_action_clicked():
if GameInfo.game_data.current_region_data:
if GameInfo.game_data.current_region_data != null:
SceneManager.change_to_scene_id("REGION")
func update_screen_info(region_data : RegionData):
%RegionNameInfo.text = region_data.region_name
%DayNumberInfo.text = tr("DAY_%d") % region_data.day
%PlantNumberInfo.text = tr("%d_PLANTS") % len(region_data.score_by_plant)
%PlantPointInfo.text = tr("SCORE_%d") % region_data.get_score()

View File

@@ -4,6 +4,9 @@ class_name Dashboard
const PLANET_3D_HOLO_RADIUS = 1.3
const PLANET_3D_HOLO_ARROW_SIZE = 0.3
const LAND_ICON = preload("res://common/icons/arrow-narrow-down.svg")
const GROWTH_ICON = preload("res://common/icons/growth.svg")
const CHARGE_ICON = preload("res://common/icons/bolt.svg")
signal main_screen_activated
signal right_screen_activated
@@ -13,21 +16,16 @@ signal left_screen_activated
@export var main_screen_label : String : set = set_main_screen_label
@export var main_screen_interactable : bool : set = set_main_screen_interactable
@export var right_screen_icon : Texture : set = set_right_screen_icon
@export var right_screen_label : String : set = set_right_screen_label
@export var right_screen_interactable : bool : set = set_right_screen_interactable
@export var left_screen_icon : Texture : set = set_left_screen_icon
@export var left_screen_label : String : set = set_left_screen_label
@export var left_screen_interactable : bool : set = set_left_screen_interactable
@export var destination_label : String : set = set_destination_label
@export var destination_title_label : String : set = set_destination_title_label
@export var destination_visible : bool : set = set_destination_visible
@export var destination_longitude : float : set = set_destination_longitude
@export var not_enough_energy : bool : set = set_not_enough_energy
@export var status_text : String : set = set_status_text
@export var left_destination : RunPoint = null : set = set_left_destination
@export var right_destination : RunPoint = null : set = set_right_destination
func _ready():
%MainScreen.clicked.connect(func(): main_screen_activated.emit())
@@ -37,18 +35,13 @@ func _ready():
set_main_screen_icon()
set_main_screen_label()
set_main_screen_interactable()
set_right_screen_icon()
set_right_screen_label()
set_right_screen_interactable()
set_left_screen_icon()
set_left_screen_label()
set_left_screen_interactable()
set_destination_label()
set_destination_title_label()
set_destination_visible()
set_destination_longitude()
set_not_enough_energy()
set_status_text()
set_left_destination()
set_right_destination()
func set_main_screen_icon(v : Texture = main_screen_icon):
main_screen_icon = v
@@ -66,38 +59,6 @@ func set_main_screen_interactable(v : bool = main_screen_interactable):
%MainScreenSprite.visible = v
%MainScreen.interactable = v
func set_right_screen_icon(v : Texture = right_screen_icon):
right_screen_icon = v
if is_node_ready():
%RightScreenActionIcon.texture = v
func set_right_screen_label(v : String = right_screen_label):
right_screen_label = v
if is_node_ready():
%RightScreenActionLabel.text = v
func set_right_screen_interactable(v : bool = right_screen_interactable):
right_screen_interactable = v
if is_node_ready():
%RightScreenAction.visible = v
%RightScreen.interactable = v
func set_left_screen_icon(v : Texture = left_screen_icon):
left_screen_icon = v
if is_node_ready():
%LeftScreenActionIcon.texture = v
func set_left_screen_label(v : String = left_screen_label):
left_screen_label = v
if is_node_ready():
%LeftScreenActionLabel.text = v
func set_left_screen_interactable(v : bool = left_screen_interactable):
left_screen_interactable = v
if is_node_ready():
%LeftScreenAction.visible = v
%LeftScreen.interactable = v
func set_destination_label(v := destination_label):
destination_label = v
if is_node_ready():
@@ -121,7 +82,39 @@ func set_destination_longitude(v := destination_longitude):
+ Vector3.FORWARD * PLANET_3D_HOLO_RADIUS
)
func set_not_enough_energy(v := not_enough_energy):
not_enough_energy = v
func set_status_text(v := status_text):
status_text = v
if is_node_ready():
%NotEnoughEnergyScreen.visible = v
%StatusLabel.text = v
func set_left_destination(v := left_destination):
left_destination = v
if is_node_ready():
%LeftScreenAction.visible = left_destination != null
%LeftScreen.interactable = left_destination != null
%LeftScreenStats.visible = left_destination != null
if left_destination:
%LeftScreenActionIcon.texture = LAND_ICON
%LeftScreenActionLabel.text = left_destination.region_parameter.name
%LeftScreenStat1Icon.texture = GROWTH_ICON
%LeftScreenStat1Label.text = str(left_destination.region_parameter.objective)
%LeftScreenStat2Icon.texture = CHARGE_ICON
%LeftScreenStat2Label.text = str(left_destination.region_parameter.charges)
func set_right_destination(v := right_destination):
right_destination = v
if is_node_ready():
%RightScreenAction.visible = right_destination != null
%RightScreen.interactable = right_destination != null
%RightScreenStats.visible = right_destination != null
if right_destination:
%RightScreenActionIcon.texture = LAND_ICON
%RightScreenActionLabel.text = right_destination.region_parameter.name
%RightScreenStat1Icon.texture = GROWTH_ICON
%RightScreenStat1Label.text = str(right_destination.region_parameter.objective)
%RightScreenStat2Icon.texture = CHARGE_ICON
%RightScreenStat2Label.text = str(right_destination.region_parameter.charges)

View File

@@ -2,12 +2,26 @@ extends Node3D
const DIALOG_PATH = "res://dialogs/timelines/story/demeter_ship_presentation.dtl"
# Cheat Code
func _input(_e):
if (
Input.is_action_pressed("drop")
and Input.is_action_pressed("move_right")
and Input.is_action_pressed("move_left")
and Input.is_action_just_pressed("action")
):
GameInfo.game_data.dialogs_done.append(DIALOG_PATH)
SceneManager.change_to_scene_id("COCKPIT")
# Called when the node enters the scene tree for the first time.
func _ready():
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
GameInfo.game_data.tutorial_done = true
%Phone.play_audio()
await %Phone.clicked
%Phone.stop_audio()
Dialogic.start(DIALOG_PATH)
await Dialogic.timeline_ended
SceneManager.change_to_scene_id("COCKPIT")

View File

@@ -77,6 +77,7 @@ surface_material_override/0 = SubResource("StandardMaterial3D_jwd5g")
[node name="Player3D" parent="." unique_id=549819967 instance=ExtResource("3_g14ji")]
unique_name_in_owner = true
transform = Transform3D(0.70710677, 0, 0.70710677, 0, 1, 0, -0.70710677, 0, 0.70710677, 31.365097, -1.8906436, 31.188667)
speed = 5.0
[node name="ship_garage" parent="." unique_id=1509517206 instance=ExtResource("4_g14ji")]