changement du scene manager, amélioration du cockpit et autres

* refonte du scene manager
* refonte du audio manager
* premier rework des plantes
* nettoyage des dossiers/fichiers
* renommage de planète en region
* fix des run
This commit is contained in:
2026-01-23 18:06:27 +01:00
parent 62b34473b6
commit 83d462f2f4
247 changed files with 2964 additions and 3159 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,41 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bbf7yy5rbgyju"
path.s3tc="res://.godot/imported/cockpit_sticker_1.png-af9ab6421f133456466632a45bc924d2.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://stages/cockpit/assets/textures/stickers/cockpit_sticker_1.png"
dest_files=["res://.godot/imported/cockpit_sticker_1.png-af9ab6421f133456466632a45bc924d2.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -0,0 +1,41 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://63drr6hunnr"
path.s3tc="res://.godot/imported/cockpit_sticker_2.png-d807c76b150ee8eb26f7b5038e21a383.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://stages/cockpit/assets/textures/stickers/cockpit_sticker_2.png"
dest_files=["res://.godot/imported/cockpit_sticker_2.png-d807c76b150ee8eb26f7b5038e21a383.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -0,0 +1,41 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b3iqtjjj5xyw0"
path.s3tc="res://.godot/imported/cockpit_sticker_3.png-18043bf04a8085e1def5c583bc308daa.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://stages/cockpit/assets/textures/stickers/cockpit_sticker_3.png"
dest_files=["res://.godot/imported/cockpit_sticker_3.png-18043bf04a8085e1def5c583bc308daa.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,41 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bfqig5y56fwfs"
path.s3tc="res://.godot/imported/cockpit_sticker_4.png-4e4fb39a62d1c769ec6529b2ef9759e0.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://stages/cockpit/assets/textures/stickers/cockpit_sticker_4.png"
dest_files=["res://.godot/imported/cockpit_sticker_4.png-4e4fb39a62d1c769ec6529b2ef9759e0.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -0,0 +1,41 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cq0xvydfqk0x4"
path.s3tc="res://.godot/imported/cockpit_sticker_5.png-56e6eb784061ef418c815c147c87ca74.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://stages/cockpit/assets/textures/stickers/cockpit_sticker_5.png"
dest_files=["res://.godot/imported/cockpit_sticker_5.png-56e6eb784061ef418c815c147c87ca74.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

View File

@@ -1,14 +1,23 @@
[gd_scene load_steps=28 format=3 uid="uid://fhnrl3dregsm"]
[gd_scene load_steps=47 format=3 uid="uid://fhnrl3dregsm"]
[ext_resource type="Script" uid="uid://b4tpigoloyxu0" path="res://stages/cockpit/scripts/cockpit.gd" id="1_koamw"]
[ext_resource type="Shader" uid="uid://bv2rghn44mrrf" path="res://stages/title_screen/resources/shaders/stars.gdshader" id="1_sk3hm"]
[ext_resource type="PackedScene" uid="uid://xsllr3c4yde1" path="res://stages/cockpit/assets/3d/cockpit.blend" id="2_3b5pk"]
[ext_resource type="Texture2D" uid="uid://63drr6hunnr" path="res://stages/cockpit/assets/textures/stickers/cockpit_sticker_2.png" id="2_x3r0l"]
[ext_resource type="Texture2D" uid="uid://l2xplg72hs6j" path="res://common/icons/map-pin.svg" id="3_3b5pk"]
[ext_resource type="Texture2D" uid="uid://bbf7yy5rbgyju" path="res://stages/cockpit/assets/textures/stickers/cockpit_sticker_1.png" id="3_5t1te"]
[ext_resource type="Texture2D" uid="uid://b3iqtjjj5xyw0" path="res://stages/cockpit/assets/textures/stickers/cockpit_sticker_3.png" id="3_i3c17"]
[ext_resource type="PackedScene" uid="uid://cm5b7w7j6527f" path="res://stages/title_screen/planet_3d.tscn" id="3_oq6nq"]
[ext_resource type="Texture2D" uid="uid://dks6cugwif2em" path="res://common/icons/phone.svg" id="4_bse8l"]
[ext_resource type="Texture2D" uid="uid://cq0xvydfqk0x4" path="res://stages/cockpit/assets/textures/stickers/cockpit_sticker_5.png" id="4_omtjc"]
[ext_resource type="Texture2D" uid="uid://dex283rx00fjb" path="res://common/icons/logout.svg" id="5_oq6nq"]
[ext_resource type="Script" uid="uid://bj4d1x8n8ina" path="res://stages/cockpit/scripts/cockpit_action.gd" id="6_22o3l"]
[ext_resource type="Script" uid="uid://jsxatpqfid88" path="res://stages/cockpit/scripts/cockpit_camera.gd" id="8_koamw"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="9_i3c17"]
[ext_resource type="Theme" uid="uid://5au2k3vf2po3" path="res://gui/ressources/menu.tres" id="10_i3c17"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="10_j2e5k"]
[ext_resource type="Texture2D" uid="uid://ba8vh5h3r6pr2" path="res://common/icons/focus.svg" id="11_6o275"]
[ext_resource type="PackedScene" uid="uid://clicjf8ts51h8" path="res://gui/game/inventory_gui/inventory_gui.tscn" id="11_eodxe"]
[ext_resource type="PackedScene" uid="uid://da7a74dg30q1l" path="res://stages/cockpit/player_3d/player_3D.tscn" id="13_a2cx2"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_7a1qq"]
shader = ExtResource("1_sk3hm")
@@ -49,51 +58,55 @@ fog_sky_affect = 0.0
adjustment_enabled = true
adjustment_saturation = 1.3
[sub_resource type="FastNoiseLite" id="FastNoiseLite_22o3l"]
seed = -1177198901
frequency = 1.0
[sub_resource type="PlaneMesh" id="PlaneMesh_omtjc"]
size = Vector2(0.2, 0.2)
[sub_resource type="Animation" id="Animation_koamw"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_i3c17"]
transparency = 1
albedo_texture = ExtResource("2_x3r0l")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_x34yc"]
transparency = 1
albedo_texture = ExtResource("3_i3c17")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_omtjc"]
transparency = 1
albedo_texture = ExtResource("3_5t1te")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_b2myc"]
transparency = 1
albedo_texture = ExtResource("4_omtjc")
[sub_resource type="ViewportTexture" id="ViewportTexture_x34yc"]
viewport_path = NodePath("Screens/MissionStatusScreen/SubViewport")
[sub_resource type="ViewportTexture" id="ViewportTexture_omtjc"]
viewport_path = NodePath("Screens/MissionInfoScreen/SubViewport")
[sub_resource type="StyleBoxLine" id="StyleBoxLine_i3c17"]
color = Color(1, 1, 1, 1)
grow_begin = -20.0
grow_end = -20.0
thickness = 2
[sub_resource type="SphereShape3D" id="SphereShape3D_3b5pk"]
radius = 0.7953847
[sub_resource type="Animation" id="Animation_a2cx2"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("../Planet3d:rotation:z")
tracks/0/path = NodePath("Sprite3D:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0.0]
}
[sub_resource type="Animation" id="Animation_22o3l"]
resource_name = "turn"
length = 50.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("../Planet3d:rotation:z")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 50),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, -6.283]
"values": [Vector3(1, 1, 1)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_biiuk"]
_data = {
&"RESET": SubResource("Animation_koamw"),
&"turn": SubResource("Animation_22o3l")
}
[sub_resource type="SphereShape3D" id="SphereShape3D_3b5pk"]
radius = 0.5618684
[sub_resource type="Animation" id="Animation_eodxe"]
resource_name = "hover"
length = 0.6
@@ -111,28 +124,30 @@ tracks/0/keys = {
"values": [Vector3(1, 1, 1), Vector3(1.4, 1.4, 1.4), Vector3(1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_a2cx2"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite3D:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(1, 1, 1)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_6o275"]
_data = {
&"RESET": SubResource("Animation_a2cx2"),
&"hover": SubResource("Animation_eodxe")
}
[sub_resource type="SphereShape3D" id="SphereShape3D_oq6nq"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_eodxe"]
radius = 0.50097656
height = 1.5996094
[sub_resource type="Animation" id="Animation_j2e5k"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite3D2:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0.9, 0.9, 0.9)]
}
[sub_resource type="Animation" id="Animation_biiuk"]
resource_name = "hover"
@@ -141,53 +156,14 @@ loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite3D:scale")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.3, 0.6),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0.4, 0.4, 0.4), Vector3(0.6, 0.6, 0.6), Vector3(0.4, 0.4, 0.4)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite3D2:scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.3, 0.6),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0.4, 0.4, 0.4), Vector3(0.6, 0.6, 0.6), Vector3(0.4, 0.4, 0.4)]
}
[sub_resource type="Animation" id="Animation_j2e5k"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite3D:scale")
tracks/0/path = NodePath("Sprite3D2:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"times": PackedFloat32Array(0, 0.3, 0.6),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0.4, 0.4, 0.4)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite3D2:scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0.4, 0.4, 0.4)]
"values": [Vector3(0.9, 0.9, 0.9), Vector3(1.2, 1.2, 1.2), Vector3(0.9, 0.9, 0.9)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_eodxe"]
@@ -196,64 +172,357 @@ _data = {
&"hover": SubResource("Animation_biiuk")
}
[sub_resource type="Animation" id="Animation_oq6nq"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_i3c17"]
seed = 1456598324
frequency = 1.0
[sub_resource type="Animation" id="Animation_koamw"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera3D:position:x")
tracks/0/path = NodePath("Planet3d:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0.35664433]
"update": 0,
"values": [Vector3(0, 0, 0)]
}
[sub_resource type="Animation" id="Animation_22o3l"]
resource_name = "turn"
length = 50.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Planet3d:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 50),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, 0, -6.2831855)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_biiuk"]
_data = {
&"RESET": SubResource("Animation_koamw"),
&"turn": SubResource("Animation_22o3l")
}
[sub_resource type="Animation" id="Animation_gspic"]
resource_name = "Failed"
length = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Screens/MissionStatusScreen/SubViewport/MissionStatusScreenBackground:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0.9849854, 0.19995773, 0.28067547, 0.74509805)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera3D:position:y")
tracks/1/path = NodePath("Screens/MissionInfoScreen/SubViewport/MissionInfoScreenBackground:color")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0.9843137, 0.2, 0.28235295, 0.74509805)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Screens/MissionStatusScreen/SubViewport/MarginContainer/MissionSuceededLabel:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0.0]
"values": [false]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Screens/MissionStatusScreen/SubViewport/MarginContainer/MissionFailedLabel:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("OmniLight3D:light_color")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0.97731525, 0.2915524, 0.2839255, 1)]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Screens/MissionStatusScreen/SubViewport/MarginContainer/MissionInProgressLabel:visible")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0.033333335),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_bse8l"]
resource_name = "arrive"
[sub_resource type="Animation" id="Animation_ad5tn"]
resource_name = "InProgress"
length = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera3D:position:x")
tracks/0/interp = 2
tracks/0/path = NodePath("Screens/MissionStatusScreen/SubViewport/MissionStatusScreenBackground:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [1.5, 0.4649279]
"values": [Color(0.9019608, 0.36078432, 0, 0.74509805)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera3D:position:y")
tracks/1/interp = 2
tracks/1/path = NodePath("Screens/MissionInfoScreen/SubViewport/MissionInfoScreenBackground:color")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.23333333, 0.5, 0.73333335, 1),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0, -0.1, 0.0, -0.1, 0.0]
"values": [Color(0.9, 0.36, 0, 0.74509805)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Screens/MissionStatusScreen/SubViewport/MarginContainer/MissionSuceededLabel:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Screens/MissionStatusScreen/SubViewport/MarginContainer/MissionFailedLabel:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("OmniLight3D:light_color")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 0.7176471, 0.011764706, 1)]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Screens/MissionStatusScreen/SubViewport/MarginContainer/MissionInProgressLabel:visible")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_4qr0g"]
[sub_resource type="Animation" id="Animation_i3c17"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Screens/MissionStatusScreen/SubViewport/MissionStatusScreenBackground:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0.9019608, 0.36078432, 0, 0.74509805)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Screens/MissionInfoScreen/SubViewport/MissionInfoScreenBackground:color")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0.9, 0.36, 0, 0.74509805)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Screens/MissionStatusScreen/SubViewport/MarginContainer/MissionSuceededLabel:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Screens/MissionStatusScreen/SubViewport/MarginContainer/MissionFailedLabel:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("OmniLight3D:light_color")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 0.7176471, 0.011764706, 1)]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Screens/MissionStatusScreen/SubViewport/MarginContainer/MissionInProgressLabel:visible")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
[sub_resource type="Animation" id="Animation_x34yc"]
resource_name = "Succeeded"
length = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Screens/MissionStatusScreen/SubViewport/MissionStatusScreenBackground:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0.37824857, 0.63324684, 0.22696605, 0.74509805)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Screens/MissionInfoScreen/SubViewport/MissionInfoScreenBackground:color")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0.3764706, 0.6313726, 0.22745098, 0.74509805)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Screens/MissionStatusScreen/SubViewport/MarginContainer/MissionSuceededLabel:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Screens/MissionStatusScreen/SubViewport/MarginContainer/MissionFailedLabel:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("OmniLight3D:light_color")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0.5093917, 0.8912099, 0.21535316, 1)]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Screens/MissionStatusScreen/SubViewport/MarginContainer/MissionInProgressLabel:visible")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_gspic"]
_data = {
&"RESET": SubResource("Animation_oq6nq"),
&"arrive": SubResource("Animation_bse8l")
&"Failed": SubResource("Animation_gspic"),
&"InProgress": SubResource("Animation_ad5tn"),
&"RESET": SubResource("Animation_i3c17"),
&"Succeeded": SubResource("Animation_x34yc")
}
[node name="Cockpit" type="Node3D"]
@@ -262,21 +531,182 @@ script = ExtResource("1_koamw")
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_ers7b")
[node name="Stickers" type="Node3D" parent="."]
[node name="Sprite3D2" type="MeshInstance3D" parent="Stickers"]
transform = Transform3D(-1, -8.560637e-08, -1.7728233e-08, 0, 0.20278734, -0.9792228, 8.742278e-08, -0.9792228, -0.20278734, 2.1191812, 0.086021006, 1.3936621)
mesh = SubResource("PlaneMesh_omtjc")
surface_material_override/0 = SubResource("StandardMaterial3D_i3c17")
[node name="Sprite3D4" type="MeshInstance3D" parent="Stickers"]
transform = Transform3D(-1, 8.742278e-08, -3.821371e-15, 0, -4.371139e-08, -1, -8.742278e-08, -1, 4.371139e-08, 4.7137933, 0.1327298, 0.21573234)
mesh = SubResource("PlaneMesh_omtjc")
surface_material_override/0 = SubResource("StandardMaterial3D_x34yc")
[node name="Sprite3D5" type="MeshInstance3D" parent="Stickers"]
transform = Transform3D(-1, 8.742278e-08, -3.821371e-15, 0, -4.371139e-08, -1, -8.742278e-08, -1, 4.371139e-08, 4.512491, 0.377854, 0.21573234)
mesh = SubResource("PlaneMesh_omtjc")
surface_material_override/0 = SubResource("StandardMaterial3D_omtjc")
[node name="Sprite3D3" type="MeshInstance3D" parent="Stickers"]
transform = Transform3D(-1, -8.560637e-08, -1.7728233e-08, 0, 0.20278734, -0.9792228, 8.742278e-08, -0.9792228, -0.20278734, 1.8158855, 0.27269027, 1.4397132)
mesh = SubResource("PlaneMesh_omtjc")
surface_material_override/0 = SubResource("StandardMaterial3D_b2myc")
[node name="Cockpit" parent="." instance=ExtResource("2_3b5pk")]
[node name="Planet3d" parent="." instance=ExtResource("3_oq6nq")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -33.448, -83.679, 0)
radius = 80.0
details = 112
noise = SubResource("FastNoiseLite_22o3l")
height = 11.26
[node name="Screens" type="Node3D" parent="."]
[node name="AnimationPlayer" type="AnimationPlayer" parent="Planet3d"]
root_node = NodePath("../../ArriveAnimationPlayer")
libraries = {
&"": SubResource("AnimationLibrary_biiuk")
}
autoplay = "turn"
[node name="MissionStatusScreen" type="Sprite3D" parent="Screens"]
transform = Transform3D(-0.09661018, 0, 0.9953223, 0, 1, 0, -0.9953223, 0, -0.09661018, -0.9638628, 0.22434545, 0.9572436)
pixel_size = 0.003
texture = SubResource("ViewportTexture_x34yc")
[node name="SubViewport" type="SubViewport" parent="Screens/MissionStatusScreen"]
transparent_bg = true
size = Vector2i(300, 200)
[node name="MissionStatusScreenBackground" type="ColorRect" parent="Screens/MissionStatusScreen/SubViewport"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.9019608, 0.36078432, 0, 0.74509805)
[node name="MarginContainer" type="MarginContainer" parent="Screens/MissionStatusScreen/SubViewport"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="MissionInProgressLabel" type="Label" parent="Screens/MissionStatusScreen/SubViewport/MarginContainer"]
layout_mode = 2
size_flags_vertical = 1
text = "MISSION_IN_PROGRESS"
label_settings = ExtResource("9_i3c17")
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="MissionSuceededLabel" type="Label" parent="Screens/MissionStatusScreen/SubViewport/MarginContainer"]
visible = false
layout_mode = 2
size_flags_vertical = 1
text = "MISSION_SUCCEEDED"
label_settings = ExtResource("9_i3c17")
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="MissionFailedLabel" type="Label" parent="Screens/MissionStatusScreen/SubViewport/MarginContainer"]
visible = false
layout_mode = 2
size_flags_vertical = 1
text = "MISSION_FAILED"
label_settings = ExtResource("9_i3c17")
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="MissionInfoScreen" type="Sprite3D" parent="Screens"]
transform = Transform3D(0.06808507, 0, 0.99767953, 0, 1, 0, -0.99767953, 0, 0.06808507, -0.94923043, 0.32125425, -0.8842205)
pixel_size = 0.003
texture = SubResource("ViewportTexture_omtjc")
[node name="SubViewport" type="SubViewport" parent="Screens/MissionInfoScreen"]
transparent_bg = true
size = Vector2i(200, 260)
[node name="MissionInfoScreenBackground" type="ColorRect" parent="Screens/MissionInfoScreen/SubViewport"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.9, 0.36, 0, 0.74509805)
[node name="MarginContainer" type="MarginContainer" parent="Screens/MissionInfoScreen/SubViewport"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("10_j2e5k")
[node name="VBoxContainer" type="VBoxContainer" parent="Screens/MissionInfoScreen/SubViewport/MarginContainer"]
layout_mode = 2
theme = ExtResource("10_j2e5k")
[node name="RegionNameInfo" type="Label" parent="Screens/MissionInfoScreen/SubViewport/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "Blabloup"
label_settings = ExtResource("9_i3c17")
horizontal_alignment = 1
autowrap_mode = 2
[node name="HSeparator" type="HSeparator" parent="Screens/MissionInfoScreen/SubViewport/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/separation = 4
theme_override_styles/separator = SubResource("StyleBoxLine_i3c17")
[node name="DayNumberInfo" type="RichTextLabel" parent="Screens/MissionInfoScreen/SubViewport/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme = ExtResource("10_i3c17")
theme_override_font_sizes/normal_font_size = 25
theme_override_font_sizes/bold_font_size = 25
theme_override_font_sizes/bold_italics_font_size = 25
theme_override_font_sizes/italics_font_size = 25
theme_override_font_sizes/mono_font_size = 25
bbcode_enabled = true
text = "Day [b]10[/b]"
fit_content = true
autowrap_mode = 2
horizontal_alignment = 1
[node name="PlantNumberInfo" type="RichTextLabel" parent="Screens/MissionInfoScreen/SubViewport/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme = ExtResource("10_i3c17")
theme_override_font_sizes/normal_font_size = 25
theme_override_font_sizes/bold_font_size = 25
theme_override_font_sizes/bold_italics_font_size = 25
theme_override_font_sizes/italics_font_size = 25
theme_override_font_sizes/mono_font_size = 25
bbcode_enabled = true
text = "5 plants"
fit_content = true
autowrap_mode = 2
horizontal_alignment = 1
[node name="PlantPointInfo" type="RichTextLabel" parent="Screens/MissionInfoScreen/SubViewport/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme = ExtResource("10_i3c17")
theme_override_font_sizes/normal_font_size = 25
theme_override_font_sizes/bold_font_size = 25
theme_override_font_sizes/bold_italics_font_size = 25
theme_override_font_sizes/italics_font_size = 25
theme_override_font_sizes/mono_font_size = 25
bbcode_enabled = true
text = "15 Garden Points"
fit_content = true
autowrap_mode = 2
horizontal_alignment = 1
[node name="OmniLight3D" type="OmniLight3D" parent="."]
transform = Transform3D(0.88172376, -0.12210212, 0.45569107, -0.47176614, -0.22820693, 0.8516797, -4.3180254e-08, -0.9659258, -0.2588191, 2.9457722, 1.2488832, -0.00129807)
light_color = Color(1, 0.7176471, 0.011764706, 1)
light_energy = 0.05
shadow_enabled = true
omni_attenuation = 0.048
[node name="Player3D" parent="." node_paths=PackedStringArray("pointer_texture_rect") instance=ExtResource("13_a2cx2")]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 2.390058, -0.2572075, -0.05658534)
pointer_texture_rect = NodePath("../CanvasLayer/Pointer")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.88172376, -0.122102074, 0.45569107, -0.47176614, -0.22820692, 0.8516797, 0, -0.9659259, -0.25881907, 0.03206873, 3.2286942, -1.7533616)
@@ -287,16 +717,17 @@ directional_shadow_mode = 1
directional_shadow_split_1 = 0.039
[node name="MapAction" type="Area3D" parent="." node_paths=PackedStringArray("animation_player")]
unique_name_in_owner = true
transform = Transform3D(-4.371139e-08, -0.9816273, 0.19080897, 0, 0.19080897, 0.9816273, -1, 4.290829e-08, -8.340525e-09, -0.652, -0.162, 0)
script = ExtResource("6_22o3l")
animation_player = NodePath("AnimationPlayer")
[node name="Sprite3D" type="Sprite3D" parent="MapAction"]
transform = Transform3D(1, 0, 0, 0, 1, 3.5787761e-16, 0, -3.5787761e-16, 1, 0, 0, 0)
transform = Transform3D(1, 0, 0, 0, 1, 3.578776e-16, 0, -3.578776e-16, 1, 6.3611534e-09, 0.14808768, -0.0008355081)
texture = ExtResource("3_3b5pk")
[node name="CollisionShape3D" type="CollisionShape3D" parent="MapAction"]
transform = Transform3D(1, 2.1316282e-14, -5.3290705e-15, 0, 1, -3.5787743e-16, 0, -3.5787748e-16, 1, 4.1635495e-10, -0.011038661, -0.10670784)
transform = Transform3D(1, 2.4868996e-14, -6.217249e-15, 0, 1, -3.578774e-16, 0, -3.5787743e-16, 1, 6.077224e-09, 0.1160875, -0.13141868)
shape = SubResource("SphereShape3D_3b5pk")
[node name="AnimationPlayer" type="AnimationPlayer" parent="MapAction"]
@@ -313,44 +744,75 @@ texture = ExtResource("4_bse8l")
[node name="ExitAction" type="Area3D" parent="." node_paths=PackedStringArray("animation_player")]
unique_name_in_owner = true
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 0.35664433, 0, 0)
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 1.9359307, -0.14775532, 1.3062965)
script = ExtResource("6_22o3l")
animation_player = NodePath("AnimationPlayer")
[node name="Sprite3D" type="Sprite3D" parent="ExitAction"]
transform = Transform3D(0.3899745, 0, -0.08899378, 0, 0.4, 0, 0.08899378, 0, 0.3899745, 1.22, -0.572, -1.003)
texture = ExtResource("5_oq6nq")
[node name="Sprite3D2" type="Sprite3D" parent="ExitAction"]
transform = Transform3D(0.38990447, 0, 0.089300044, 0, 0.4, 0, -0.089300044, 0, 0.38990447, -1.22, -0.572, -1.003)
transform = Transform3D(-3.934025e-08, 0, -0.9, 0, 0.9, 0, 0.9, 0, -3.934025e-08, 0, -0.09688908, 0)
flip_h = true
texture = ExtResource("5_oq6nq")
[node name="CollisionShape3D" type="CollisionShape3D" parent="ExitAction"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.1033944, -0.664206, -0.880886)
shape = SubResource("SphereShape3D_oq6nq")
[node name="CollisionShape3D2" type="CollisionShape3D" parent="ExitAction"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.103, -0.664, -0.881)
shape = SubResource("SphereShape3D_oq6nq")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.25628877, 0, -5.9604645e-07)
shape = SubResource("CapsuleShape3D_eodxe")
[node name="AnimationPlayer" type="AnimationPlayer" parent="ExitAction"]
libraries = {
&"": SubResource("AnimationLibrary_eodxe")
}
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 0.35664433, 0, 0)
fov = 92.8
near = 0.003
script = ExtResource("8_koamw")
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="ArriveAnimationPlayer" type="AnimationPlayer" parent="."]
[node name="MarginContainer" type="MarginContainer" parent="CanvasLayer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("10_j2e5k")
[node name="Inventory" parent="CanvasLayer/MarginContainer" instance=ExtResource("11_eodxe")]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 8
[node name="Pointer" type="TextureRect" parent="CanvasLayer"]
custom_minimum_size = Vector2(30, 30)
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -2.5
offset_top = -2.5
offset_right = 2.5
offset_bottom = 2.5
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("11_6o275")
expand_mode = 1
[node name="Planet3d" parent="." instance=ExtResource("3_oq6nq")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -33.448, -83.679, 0)
radius = 80.0
details = 112
noise = SubResource("FastNoiseLite_i3c17")
height = 11.26
[node name="AnimationPlayer" type="AnimationPlayer" parent="Planet3d"]
root_node = NodePath("../..")
libraries = {
&"": SubResource("AnimationLibrary_biiuk")
}
[node name="StateAnimationPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true
libraries = {
&"": SubResource("AnimationLibrary_4qr0g")
&"": SubResource("AnimationLibrary_gspic")
}
autoplay = "arrive"
[connection signal="clicked" from="MapAction" to="." method="_on_map_action_clicked"]
[connection signal="clicked" from="ExitAction" to="." method="_on_exit_action_clicked"]

View File

@@ -0,0 +1,20 @@
[gd_scene load_steps=3 format=3 uid="uid://da7a74dg30q1l"]
[ext_resource type="Script" uid="uid://3rrym6yv7xyp" path="res://stages/cockpit/player_3d/scripts/player_3d.gd" id="1_pvvbh"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_eodxe"]
radius = 0.46868896
height = 1.7342377
[node name="Player3D" type="CharacterBody3D"]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 0, 0, 0)
script = ExtResource("1_pvvbh")
[node name="Camera3D" type="Camera3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.19785136, 0)
near = 0.003
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.253273, 0)
shape = SubResource("CapsuleShape3D_eodxe")

View File

@@ -0,0 +1,71 @@
extends CharacterBody3D
const POINTER_TEXTURE = preload("res://common/icons/focus.svg")
const POINTER_ACTION_TEXTURE = preload("res://common/icons/hand-stop.svg")
@export var pointer_texture_rect : TextureRect
const SPEED = 2.0
const MOUSE_SENSIVITY = 0.002
const RAY_LENGTH = 10.
var cockpit_action_hovered : CockpitAction = null
var query_mouse := false
func _input(event):
if event is InputEventMouseMotion and Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:
rotate_y(-event.relative.x * MOUSE_SENSIVITY)
%Camera3D.rotate_x(-event.relative.y * MOUSE_SENSIVITY)
%Camera3D.rotation.x = clampf($Camera3D.rotation.x, -deg_to_rad(70), deg_to_rad(70))
query_mouse = true
if event.is_action_pressed("action") and cockpit_action_hovered and cockpit_action_hovered:
cockpit_action_hovered.click()
func _physics_process(delta):
if query_mouse:
update_mouse_hovered_cockpit_actions()
if pointer_texture_rect :
pointer_texture_rect.texture = (
POINTER_ACTION_TEXTURE if cockpit_action_hovered != null
else POINTER_TEXTURE
)
query_mouse = false
# Add the gravity.
if not is_on_floor():
velocity += get_gravity() * delta
# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var input_dir = Input.get_vector("move_left", "move_right", "move_up", "move_down")
var direction = (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
if direction:
velocity.x = direction.x * SPEED
velocity.z = direction.z * SPEED
else:
velocity.x = move_toward(velocity.x, 0, SPEED)
velocity.z = move_toward(velocity.z, 0, SPEED)
move_and_slide()
func update_mouse_hovered_cockpit_actions() -> void:
var space_state = get_world_3d().direct_space_state
var middle_screen = get_viewport().get_visible_rect().size / 2
var from = %Camera3D.project_ray_origin(middle_screen)
var to = from + %Camera3D.project_ray_normal(middle_screen) * RAY_LENGTH
var query = PhysicsRayQueryParameters3D.create(from, to)
query.collide_with_areas = true
var result = space_state.intersect_ray(query)
if result and result.collider and result.collider is CockpitAction and result.collider.pickable:
if cockpit_action_hovered and cockpit_action_hovered != result.collider:
cockpit_action_hovered._on_mouse_exited()
cockpit_action_hovered = result.collider
cockpit_action_hovered._on_mouse_entered()
else :
if cockpit_action_hovered:
cockpit_action_hovered._on_mouse_exited()
cockpit_action_hovered = null

View File

@@ -0,0 +1 @@
uid://3rrym6yv7xyp

View File

@@ -3,3 +3,4 @@
[resource]
transparency = 1
blend_mode = 1
metallic_specular = 0.0

View File

@@ -1,3 +1,4 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://pwv7126nlcn2"]
[resource]
metallic_specular = 0.0

View File

@@ -4,4 +4,4 @@
albedo_color = Color(1, 0.7176471, 0.011764706, 1)
emission_enabled = true
emission = Color(1, 0.7176471, 0.011764706, 1)
emission_energy_multiplier = 0.8
emission_energy_multiplier = 0.5

View File

@@ -2,15 +2,35 @@ extends Node3D
class_name Cockpit
func _ready():
if not GameInfo.game_data.get_current_planet_data():
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
var region_data := GameInfo.game_data.current_region_data
if not GameInfo.game_data.current_region_data:
%ExitAction.hide()
%ExitAction.pickable = false
if region_data:
var state := region_data.get_state()
match state:
RegionData.State.IN_PROGRESS:
%StateAnimationPlayer.play("InProgress")
%MapAction.hide()
%MapAction.pickable = false
RegionData.State.FAILED:
%StateAnimationPlayer.play("Failed")
RegionData.State.SUCCEEDED:
%StateAnimationPlayer.play("Succeeded")
update_screen_info(region_data)
func _on_map_action_clicked():
SceneManager.change_scene(SceneManager.REGION_SELECTION_SCREEN)
SceneManager.change_scene("REGION_SELECTION")
func _on_exit_action_clicked():
if GameInfo.game_data.get_current_planet_data():
%ArriveAnimationPlayer.play_backwards("arrive")
await %ArriveAnimationPlayer.animation_finished
SceneManager.change_scene(SceneManager.PLANET_SCENE)
if GameInfo.game_data.current_region_data:
SceneManager.change_scene("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

@@ -1,6 +1,8 @@
extends Area3D
class_name CockpitAction
var pickable = true
signal clicked
@export var animation_player : AnimationPlayer

View File

@@ -1,39 +0,0 @@
extends Camera3D
const RAY_LENGTH = 1000.
var cockpit_action_hovered : CockpitAction = null
var _mouse_event : InputEventMouse
var _query_mouse := false
func _unhandled_input(event):
if event is InputEventMouse:
_mouse_event = event
_query_mouse = true
if event.is_action_pressed("action") and cockpit_action_hovered and cockpit_action_hovered:
cockpit_action_hovered.click()
func _physics_process(_delta):
if _query_mouse:
update_mouse_hovered_cockpit_actions()
_query_mouse = false
func update_mouse_hovered_cockpit_actions() -> void:
var space_state = get_world_3d().direct_space_state
var from = project_ray_origin(_mouse_event.position)
var to = from + project_ray_normal(_mouse_event.position) * RAY_LENGTH
var query = PhysicsRayQueryParameters3D.create(from, to)
query.collide_with_areas = true
var result = space_state.intersect_ray(query)
if result.is_empty():
if cockpit_action_hovered:
cockpit_action_hovered._on_mouse_exited()
cockpit_action_hovered = null
elif result.collider is CockpitAction:
if cockpit_action_hovered and cockpit_action_hovered != result.collider:
cockpit_action_hovered._on_mouse_exited()
cockpit_action_hovered = result.collider
cockpit_action_hovered._on_mouse_entered()

View File

@@ -1 +0,0 @@
uid://jsxatpqfid88