#22 ajout de menu, écran de pause, écran de fin et remaniement du dossier gui

This commit is contained in:
2025-08-20 13:01:39 +02:00
parent 352c49cefa
commit 219e8258e7
50 changed files with 763 additions and 162 deletions

View File

Before

Width:  |  Height:  |  Size: 887 B

After

Width:  |  Height:  |  Size: 887 B

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dcgnamu7sb3ov"
path="res://.godot/imported/bolt.svg-99699818681b1e0e18f4836dfd772b8c.ctex"
path="res://.godot/imported/bolt.svg-71cbe0c7c38f15f305dc23930d585037.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/assets/icons/bolt.svg"
dest_files=["res://.godot/imported/bolt.svg-99699818681b1e0e18f4836dfd772b8c.ctex"]
source_file="res://gui/game/assets/icons/bolt.svg"
dest_files=["res://.godot/imported/bolt.svg-71cbe0c7c38f15f305dc23930d585037.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 294 KiB

After

Width:  |  Height:  |  Size: 294 KiB

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cm3ehinvvj52i"
path="res://.godot/imported/Interface sans boutons.png-84e848a01e86bdad058d81d09d7731ba.ctex"
path="res://.godot/imported/Interface sans boutons.png-8803a272a5ab9636d02d2ab305d64a0e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/assets/texture/Interface sans boutons.png"
dest_files=["res://.godot/imported/Interface sans boutons.png-84e848a01e86bdad058d81d09d7731ba.ctex"]
source_file="res://gui/game/assets/texture/Interface sans boutons.png"
dest_files=["res://.godot/imported/Interface sans boutons.png-8803a272a5ab9636d02d2ab305d64a0e.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 285 KiB

After

Width:  |  Height:  |  Size: 285 KiB

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://c2pgaklnj5w3d"
path="res://.godot/imported/Tablette info.png-0d02a3ea4c574d196b3e778477072d61.ctex"
path="res://.godot/imported/Tablette info.png-1bbdbf5d41cf3eed26f09b419e160733.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/assets/texture/Tablette info.png"
dest_files=["res://.godot/imported/Tablette info.png-0d02a3ea4c574d196b3e778477072d61.ctex"]
source_file="res://gui/game/assets/texture/Tablette info.png"
dest_files=["res://.godot/imported/Tablette info.png-1bbdbf5d41cf3eed26f09b419e160733.ctex"]
[params]

View File

@@ -1,13 +1,14 @@
[gd_scene load_steps=17 format=3 uid="uid://12nak7amd1uq"]
[gd_scene load_steps=18 format=3 uid="uid://12nak7amd1uq"]
[ext_resource type="Script" uid="uid://cqao7n800qy40" path="res://gui/scripts/root_gui.gd" id="1_udau0"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="2_nq5i2"]
[ext_resource type="Texture2D" uid="uid://cm3ehinvvj52i" path="res://gui/assets/texture/Interface sans boutons.png" id="3_n4kem"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://gui/assets/icons/bolt.svg" id="4_k4juk"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/default_label_settings.tres" id="4_ujg5r"]
[ext_resource type="Texture2D" uid="uid://c2pgaklnj5w3d" path="res://gui/assets/texture/Tablette info.png" id="6_fovlv"]
[ext_resource type="Script" uid="uid://cqao7n800qy40" path="res://gui/game/scripts/game_gui.gd" id="1_udau0"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/game/ressources/default_theme.tres" id="2_nq5i2"]
[ext_resource type="Texture2D" uid="uid://cm3ehinvvj52i" path="res://gui/game/assets/texture/Interface sans boutons.png" id="3_n4kem"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://gui/game/assets/icons/bolt.svg" id="4_k4juk"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/game/ressources/default_label_settings.tres" id="4_ujg5r"]
[ext_resource type="Texture2D" uid="uid://c2pgaklnj5w3d" path="res://gui/game/assets/texture/Tablette info.png" id="6_fovlv"]
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="7_n4kem"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/ressources/fonts/spincycle_ot.otf" id="8_n4kem"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/game/ressources/fonts/spincycle_ot.otf" id="8_n4kem"]
[ext_resource type="Texture2D" uid="uid://b5cuxgisrsfgt" path="res://gui/game/pause/assets/icons/player-pause.svg" id="9_2wykm"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ek73b"]
atlas = ExtResource("7_n4kem")
@@ -59,6 +60,22 @@ tracks/2/keys = {
"values": [-44.0]
}
[sub_resource type="Animation" id="Animation_n4kem"]
resource_name = "no_energy_left"
length = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MarginContainer/PlayerInfo/EnergyInfo:offset_left")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.0666667, 0.133333, 0.2, 0.266667, 0.333333, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1),
"update": 0,
"values": [-44.0, -40.0, -44.0, -48.0, -44.0, -40.0, -44.0]
}
[sub_resource type="Animation" id="Animation_k4juk"]
resource_name = "recharge_fade_in"
tracks/0/type = "value"
@@ -113,22 +130,6 @@ tracks/1/keys = {
"values": [false]
}
[sub_resource type="Animation" id="Animation_n4kem"]
resource_name = "no_energy_left"
length = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MarginContainer/PlayerInfo/EnergyInfo:offset_left")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.0666667, 0.133333, 0.2, 0.266667, 0.333333, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1),
"update": 0,
"values": [-44.0, -40.0, -44.0, -48.0, -44.0, -40.0, -44.0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_n4kem"]
_data = {
&"RESET": SubResource("Animation_iyvkh"),
@@ -235,13 +236,6 @@ theme = ExtResource("2_nq5i2")
text = "Recharge"
icon = ExtResource("4_k4juk")
[node name="DayCount" type="Label" parent="MarginContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 0
label_settings = ExtResource("4_ujg5r")
[node name="ItemInfo" type="TextureRect" parent="MarginContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(0, 300)
@@ -325,6 +319,28 @@ visible = false
layout_mode = 2
text = "space/click - Use Item"
[node name="TopRightContent" type="HBoxContainer" parent="MarginContainer"]
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 0
alignment = 1
[node name="DayCount" type="Label" parent="MarginContainer/TopRightContent"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 0
text = "Day 0"
label_settings = ExtResource("4_ujg5r")
vertical_alignment = 1
[node name="Pause" type="Button" parent="MarginContainer/TopRightContent"]
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 0
focus_mode = 0
icon = ExtResource("9_2wykm")
[node name="RechargeFade" type="ColorRect" parent="."]
physics_interpolation_mode = 0
visible = false
@@ -348,3 +364,4 @@ offset_bottom = 40.0
[connection signal="button_down" from="GameAction" to="." method="_on_game_action_button_down"]
[connection signal="pressed" from="MarginContainer/DayPass" to="." method="_on_day_pass_pressed"]
[connection signal="pressed" from="MarginContainer/TopRightContent/Pause" to="." method="_on_pause_pressed"]

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-logout"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2" /><path d="M9 12h12l-3 -3" /><path d="M18 15l3 -3" /></svg>

After

Width:  |  Height:  |  Size: 451 B

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dex283rx00fjb"
path="res://.godot/imported/logout.svg-adb7b7ff1fadfa9220dcf694870580b9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/game/pause/assets/icons/logout.svg"
dest_files=["res://.godot/imported/logout.svg-adb7b7ff1fadfa9220dcf694870580b9.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#ffffff" class="icon icon-tabler icons-tabler-filled icon-tabler-player-pause"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z" /><path d="M17 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z" /></svg>

After

Width:  |  Height:  |  Size: 412 B

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b5cuxgisrsfgt"
path="res://.godot/imported/player-pause.svg-cb8236066c72679196b716c41226079f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/game/pause/assets/icons/player-pause.svg"
dest_files=["res://.godot/imported/player-pause.svg-cb8236066c72679196b716c41226079f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#ffffff" class="icon icon-tabler icons-tabler-filled icon-tabler-player-play"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z" /></svg>

After

Width:  |  Height:  |  Size: 326 B

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://vmsn54d1ptih"
path="res://.godot/imported/player-play.svg-25043c6a392478c90f845ddfdfb35372.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/game/pause/assets/icons/player-play.svg"
dest_files=["res://.godot/imported/player-play.svg-25043c6a392478c90f845ddfdfb35372.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-rotate"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M19.95 11a8 8 0 1 0 -.5 4m.5 5v-5h-5" /></svg>

After

Width:  |  Height:  |  Size: 357 B

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bewr0t1wi8pff"
path="res://.godot/imported/rotate.svg-af6a45b9d3420200a268c1390881e44f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/game/pause/assets/icons/rotate.svg"
dest_files=["res://.godot/imported/rotate.svg-af6a45b9d3420200a268c1390881e44f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

105
gui/game/pause/pause.tscn Normal file
View File

@@ -0,0 +1,105 @@
[gd_scene load_steps=9 format=3 uid="uid://csiacsndm62ll"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/game/ressources/default_theme.tres" id="1_51ks3"]
[ext_resource type="Script" uid="uid://crt2d4m5ba25i" path="res://gui/game/pause/scripts/pause.gd" id="1_he4ox"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/game/ressources/fonts/spincycle_ot.otf" id="2_8d1kg"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/game/ressources/default_label_settings.tres" id="3_0pdto"]
[ext_resource type="Texture2D" uid="uid://vmsn54d1ptih" path="res://gui/game/pause/assets/icons/player-play.svg" id="5_apjlw"]
[ext_resource type="Texture2D" uid="uid://bewr0t1wi8pff" path="res://gui/game/pause/assets/icons/rotate.svg" id="6_58dya"]
[ext_resource type="Texture2D" uid="uid://dex283rx00fjb" path="res://gui/game/pause/assets/icons/logout.svg" id="7_yj6f1"]
[sub_resource type="LabelSettings" id="LabelSettings_apjlw"]
font = ExtResource("2_8d1kg")
font_size = 50
[node name="Pause" type="Control"]
z_index = 10
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_he4ox")
[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
[node name="Tutorial" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_51ks3")
[node name="VBoxContainer" type="VBoxContainer" parent="Tutorial"]
layout_mode = 2
theme = ExtResource("1_51ks3")
theme_override_constants/separation = 9
alignment = 1
[node name="PauseTitle" type="Label" parent="Tutorial/VBoxContainer"]
layout_mode = 2
text = "Pause"
label_settings = SubResource("LabelSettings_apjlw")
horizontal_alignment = 1
[node name="StoryTitle" type="Label" parent="Tutorial/VBoxContainer"]
layout_mode = 2
text = "Story"
label_settings = ExtResource("3_0pdto")
horizontal_alignment = 1
[node name="StoryText" type="Label" parent="Tutorial/VBoxContainer"]
layout_mode = 2
text = "You are a robot who has recently arrived on a barren planet. Find and plant seeds to reduce the contamination.
You have limited energy, but can recharge when passing days.
You have 10 days to decontaminate as much as possible.
"
horizontal_alignment = 1
[node name="ControlsTitle" type="Label" parent="Tutorial/VBoxContainer"]
layout_mode = 2
text = "Controls"
label_settings = ExtResource("3_0pdto")
horizontal_alignment = 1
[node name="ControlsText" type="Label" parent="Tutorial/VBoxContainer"]
layout_mode = 2
text = "QWERTY/AZERTY/Directional Arrows : Move
E : Interact/Pickup Items
Space/Click : Use Item
W : Drop Item
"
horizontal_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="Tutorial/VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="Resume" type="Button" parent="Tutorial/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Resume Game"
icon = ExtResource("5_apjlw")
[node name="Restart" type="Button" parent="Tutorial/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Restart"
icon = ExtResource("6_58dya")
[node name="Quit" type="Button" parent="Tutorial/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Quit"
icon = ExtResource("7_yj6f1")
[connection signal="pressed" from="Tutorial/VBoxContainer/HBoxContainer/Resume" to="." method="_on_resume_pressed"]
[connection signal="pressed" from="Tutorial/VBoxContainer/HBoxContainer/Restart" to="." method="_on_restart_pressed"]
[connection signal="pressed" from="Tutorial/VBoxContainer/HBoxContainer/Quit" to="." method="_on_quit_pressed"]

View File

@@ -0,0 +1,27 @@
extends Control
var pause = false :
set(v):
print(pause)
pause = v
visible = pause
get_tree().paused = pause
func _ready():
pause = false
func _input(_event):
if Input.is_action_just_pressed("pause"):
pause = not pause
func _on_resume_pressed():
pause = false
func _on_restart_pressed():
get_tree().reload_current_scene()
func _on_quit_pressed():
get_tree().quit()
func _on_root_gui_pause_asked():
pause = true

View File

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

View File

Before

Width:  |  Height:  |  Size: 285 KiB

After

Width:  |  Height:  |  Size: 285 KiB

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://qx75h1k3wmm1"
path="res://.godot/imported/Tablette info.png-e89cd3fdb4a303341f3bbad730de279c.ctex"
path="res://.godot/imported/Tablette info.png-b4fbef928a773f595b589d989235c266.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/ressources/Tablette info.png"
dest_files=["res://.godot/imported/Tablette info.png-e89cd3fdb4a303341f3bbad730de279c.ctex"]
source_file="res://gui/game/ressources/Tablette info.png"
dest_files=["res://.godot/imported/Tablette info.png-b4fbef928a773f595b589d989235c266.ctex"]
[params]

View File

@@ -1,6 +1,6 @@
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://dqwayi8yjwau2"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/ressources/fonts/spincycle_ot.otf" id="1_w0wva"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/game/ressources/fonts/spincycle_ot.otf" id="1_w0wva"]
[resource]
font = ExtResource("1_w0wva")

View File

@@ -1,6 +1,6 @@
[gd_resource type="Theme" load_steps=5 format=3 uid="uid://bgcmd213j6gk1"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/ressources/fonts/spincycle_ot.otf" id="1_hv6r3"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/game/ressources/fonts/spincycle_ot.otf" id="1_hv6r3"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hv6r3"]
bg_color = Color(0.976471, 0.741176, 0.4, 1)

View File

@@ -3,12 +3,12 @@
importer="font_data_dynamic"
type="FontFile"
uid="uid://byyfovm1ha5ya"
path="res://.godot/imported/AtomicMd-3zXDZ.ttf-0d8ee2c5d0b5b97084be121e0cf9710b.fontdata"
path="res://.godot/imported/AtomicMd-3zXDZ.ttf-72972057c8e238d8e668e97b2f9f70c6.fontdata"
[deps]
source_file="res://gui/ressources/fonts/AtomicMd-3zXDZ.ttf"
dest_files=["res://.godot/imported/AtomicMd-3zXDZ.ttf-0d8ee2c5d0b5b97084be121e0cf9710b.fontdata"]
source_file="res://gui/game/ressources/fonts/AtomicMd-3zXDZ.ttf"
dest_files=["res://.godot/imported/AtomicMd-3zXDZ.ttf-72972057c8e238d8e668e97b2f9f70c6.fontdata"]
[params]

View File

@@ -3,12 +3,12 @@
importer="font_data_dynamic"
type="FontFile"
uid="uid://c8xf3tfnpufk3"
path="res://.godot/imported/spincycle_3d_ot.otf-f71d33fbaded9da2ba85d0eb20bfd1e1.fontdata"
path="res://.godot/imported/spincycle_3d_ot.otf-21ea869159b3b8db074d7006cdac52ac.fontdata"
[deps]
source_file="res://gui/ressources/fonts/spincycle_3d_ot.otf"
dest_files=["res://.godot/imported/spincycle_3d_ot.otf-f71d33fbaded9da2ba85d0eb20bfd1e1.fontdata"]
source_file="res://gui/game/ressources/fonts/spincycle_3d_ot.otf"
dest_files=["res://.godot/imported/spincycle_3d_ot.otf-21ea869159b3b8db074d7006cdac52ac.fontdata"]
[params]

View File

@@ -3,12 +3,12 @@
importer="font_data_dynamic"
type="FontFile"
uid="uid://cpnsnrqhfkj3k"
path="res://.godot/imported/spincycle_ot.otf-be21809daa8fde21c00f1cf664ce2342.fontdata"
path="res://.godot/imported/spincycle_ot.otf-27679d167ed7a37649e3338357150952.fontdata"
[deps]
source_file="res://gui/ressources/fonts/spincycle_ot.otf"
dest_files=["res://.godot/imported/spincycle_ot.otf-be21809daa8fde21c00f1cf664ce2342.fontdata"]
source_file="res://gui/game/ressources/fonts/spincycle_ot.otf"
dest_files=["res://.godot/imported/spincycle_ot.otf-27679d167ed7a37649e3338357150952.fontdata"]
[params]

View File

@@ -1,10 +1,11 @@
extends Control
class_name RootGui
class_name GameGui
signal game_click
signal day_pass_pressed
signal day_pass_proceed
signal day_pass_finished
signal pause_asked
func _on_player_updated(player:Player):
%EnergyCount.text = str(player.energy)
@@ -37,9 +38,13 @@ func _on_game_action_button_down():
game_click.emit()
func _on_planet_updated(planet:Planet):
$MarginContainer/DayCount.text = "Day " + str(planet.day)
%DayCount.text = "Day " + str(planet.day)
%DecontaminationCoverage.text = str(roundi(planet.decontamination_coverage * 100)) + "%"
func _on_player_action_tried_without_energy():
$AnimationPlayer.play("no_energy_left")
func _on_pause_pressed():
pause_asked.emit()

View File

@@ -0,0 +1,19 @@
extends Control
func _ready():
visible = false
func win(decontamination_coverage : float):
visible = true
get_tree().paused = true
%WinTitle.text = "Score : " + str(roundi(decontamination_coverage * 100)) + "%"
func _on_restart_pressed():
get_tree().reload_current_scene()
func _on_quit_pressed():
get_tree().quit()
func _on_planet_day_limit_exceed(planet : Planet):
win(planet.decontamination_coverage)

View File

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

94
gui/game/win/win.tscn Normal file
View File

@@ -0,0 +1,94 @@
[gd_scene load_steps=8 format=3 uid="uid://v41hfc7haaye"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/game/ressources/default_theme.tres" id="1_cl67j"]
[ext_resource type="Script" uid="uid://b3wuxv04clyed" path="res://gui/game/win/scripts/win.gd" id="1_sehw2"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/game/ressources/fonts/spincycle_ot.otf" id="2_sehw2"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/game/ressources/default_label_settings.tres" id="3_0b3c6"]
[ext_resource type="Texture2D" uid="uid://bewr0t1wi8pff" path="res://gui/game/pause/assets/icons/rotate.svg" id="4_8p3aj"]
[ext_resource type="Texture2D" uid="uid://dex283rx00fjb" path="res://gui/game/pause/assets/icons/logout.svg" id="5_j3wid"]
[sub_resource type="LabelSettings" id="LabelSettings_eq457"]
font = ExtResource("2_sehw2")
font_size = 50
[node name="Win" type="Control"]
process_mode = 3
z_index = 101
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_sehw2")
[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
[node name="Tutorial" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_cl67j")
[node name="VBoxContainer" type="VBoxContainer" parent="Tutorial"]
layout_mode = 2
size_flags_horizontal = 4
theme = ExtResource("1_cl67j")
theme_override_constants/separation = 9
alignment = 1
[node name="WinTitle" type="Label" parent="Tutorial/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "Score : 2%"
label_settings = SubResource("LabelSettings_eq457")
horizontal_alignment = 1
[node name="ThanksTitle" type="Label" parent="Tutorial/VBoxContainer"]
layout_mode = 2
text = "Thanks for playing"
label_settings = ExtResource("3_0b3c6")
horizontal_alignment = 1
[node name="ThanksText" type="Label" parent="Tutorial/VBoxContainer"]
layout_mode = 2
text = "We need your feedback! Give us your thoughts on the game on our Discord or in the comments section of the Itch page."
horizontal_alignment = 1
[node name="HBoxContainer2" type="HBoxContainer" parent="Tutorial/VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="LinkButton" type="LinkButton" parent="Tutorial/VBoxContainer/HBoxContainer2"]
layout_mode = 2
theme = ExtResource("1_cl67j")
theme_override_font_sizes/font_size = 24
text = "Join our Discord"
uri = "https://discord.gg/VTFKvEvgfz"
[node name="HBoxContainer" type="HBoxContainer" parent="Tutorial/VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="Restart" type="Button" parent="Tutorial/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Restart"
icon = ExtResource("4_8p3aj")
[node name="Quit" type="Button" parent="Tutorial/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Quit"
icon = ExtResource("5_j3wid")
[connection signal="pressed" from="Tutorial/VBoxContainer/HBoxContainer/Restart" to="." method="_on_restart_pressed"]
[connection signal="pressed" from="Tutorial/VBoxContainer/HBoxContainer/Quit" to="." method="_on_quit_pressed"]

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://nx4wxpr6mk8l"
path="res://.godot/imported/SeedingPlanetsLogo.png-21df48940674276ef147abcb9b68381d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/menu/assets/texture/SeedingPlanetsLogo.png"
dest_files=["res://.godot/imported/SeedingPlanetsLogo.png-21df48940674276ef147abcb9b68381d.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://03ijmo6xlytu"
path="res://.godot/imported/abre1glow.png-5f3f846ff6582fe5f49aa264265fe9c7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/menu/assets/texture/abre1glow.png"
dest_files=["res://.godot/imported/abre1glow.png-5f3f846ff6582fe5f49aa264265fe9c7.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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=1

6
gui/menu/scripts/menu.gd Normal file
View File

@@ -0,0 +1,6 @@
extends Node2D
@export_file var start_scene_path : String
func _on_start_pressed():
get_tree().change_scene_to_file(start_scene_path)

View File

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