#22 ajout de menu, écran de pause, écran de fin et remaniement du dossier gui
@ -1,6 +1,6 @@
|
||||
[gd_resource type="Resource" script_class="Seed" load_steps=3 format=3 uid="uid://lrl2okkhyxmx"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://gui/assets/icons/bolt.svg" id="1_dy25s"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://gui/game/assets/icons/bolt.svg" id="1_dy25s"]
|
||||
[ext_resource type="Script" uid="uid://bypjcvlc15gsm" path="res://common/inventory/scripts/items/seed.gd" id="2_mgcdi"]
|
||||
|
||||
[resource]
|
||||
|
||||
13
common/inventory/resources/items/default_shovel.tres
Normal file
@ -0,0 +1,13 @@
|
||||
[gd_resource type="Resource" script_class="Shovel" load_steps=3 format=3 uid="uid://ddqalo1k30i5x"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bf6nw4onkhavr" path="res://common/inventory/assets/icons/shovel.svg" id="1_7g3xd"]
|
||||
[ext_resource type="Script" uid="uid://dya38x1h1uiyg" path="res://common/inventory/scripts/items/shovel.gd" id="1_28h2r"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_28h2r")
|
||||
area_width = 50.0
|
||||
area_distance = 50.0
|
||||
name = "Shovel"
|
||||
description = "Can dig burried seed, and transform mature plants to seeds."
|
||||
icon = ExtResource("1_7g3xd")
|
||||
metadata/_custom_type_script = "uid://dya38x1h1uiyg"
|
||||
@ -1,11 +0,0 @@
|
||||
[gd_resource type="Resource" script_class="Item" load_steps=3 format=3 uid="uid://bb8etgye1qtfx"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bq7admu4ahs5r" path="res://common/inventory/scripts/item.gd" id="1_0wi27"]
|
||||
[ext_resource type="Texture2D" uid="uid://bf6nw4onkhavr" path="res://common/inventory/assets/icons/shovel.svg" id="1_cxwlc"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_0wi27")
|
||||
name = "Shovel"
|
||||
description = "Transform plants to seeds"
|
||||
icon = ExtResource("1_cxwlc")
|
||||
metadata/_custom_type_script = "uid://bq7admu4ahs5r"
|
||||
@ -2,7 +2,7 @@ extends Resource
|
||||
class_name Item
|
||||
|
||||
@export var name: String
|
||||
@export var description: String
|
||||
@export_multiline var description: String
|
||||
@export var icon: Texture2D
|
||||
|
||||
func is_one_time_use():
|
||||
|
||||
@ -12,16 +12,16 @@ script = ExtResource("2_cky1j")
|
||||
impact_radius = 100
|
||||
metadata/_custom_type_script = "uid://cgscbuxe4dawb"
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ffarr"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qt76e"]
|
||||
atlas = ExtResource("6_cky1j")
|
||||
region = Rect2(1140, 345, 141, 128)
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_moyj3")
|
||||
name = "Chardi"
|
||||
description = "This plant can grow without water, and reduce contamination around when it becomes mature."
|
||||
description = "This plant reduce contamination around when it becomes mature."
|
||||
growing_time = 1
|
||||
seed_texture = SubResource("AtlasTexture_ffarr")
|
||||
seed_texture = SubResource("AtlasTexture_qt76e")
|
||||
planted_texture = ExtResource("4_2s6re")
|
||||
growing_texture = ExtResource("1_fp5j6")
|
||||
mature_texture = ExtResource("3_ffarr")
|
||||
|
||||
@ -14,7 +14,7 @@ region = Rect2(1697, 331, 125, 158)
|
||||
script = ExtResource("1_eqtut")
|
||||
name = "Maias"
|
||||
description = "This gorgeous flower has no effect, but produce a lot of seeds."
|
||||
growing_time = 2
|
||||
growing_time = 1
|
||||
seed_texture = SubResource("AtlasTexture_sri3b")
|
||||
planted_texture = ExtResource("4_iqcy2")
|
||||
growing_texture = ExtResource("1_vyplc")
|
||||
|
||||
92
game.tscn
Normal file
@ -0,0 +1,92 @@
|
||||
[gd_scene load_steps=19 format=3 uid="uid://d28cp7a21kwou"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://12nak7amd1uq" path="res://gui/game/game_gui.tscn" id="1_iotsf"]
|
||||
[ext_resource type="PackedScene" uid="uid://csiacsndm62ll" path="res://gui/game/pause/pause.tscn" id="2_215e1"]
|
||||
[ext_resource type="PackedScene" uid="uid://bgvbgeq46wee2" path="res://entities/player/player.tscn" id="2_lc2xo"]
|
||||
[ext_resource type="PackedScene" uid="uid://v41hfc7haaye" path="res://gui/game/win/win.tscn" id="3_7sc4i"]
|
||||
[ext_resource type="Script" uid="uid://dedg615xudpoq" path="res://entities/interactables/item_object/script/item_object.gd" id="3_215e1"]
|
||||
[ext_resource type="PackedScene" uid="uid://tsi5j1uxppa4" path="res://stages/terrain/planet/planet.tscn" id="6_e8heu"]
|
||||
[ext_resource type="Resource" uid="uid://ddqalo1k30i5x" path="res://common/inventory/resources/items/default_shovel.tres" id="6_lc2xo"]
|
||||
[ext_resource type="Script" uid="uid://bq7admu4ahs5r" path="res://common/inventory/scripts/item.gd" id="7_rvswv"]
|
||||
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="8_boyg6"]
|
||||
[ext_resource type="Resource" uid="uid://b04vho33bl52b" path="res://entities/plants/resources/plants/default.tres" id="9_e36ub"]
|
||||
[ext_resource type="Script" uid="uid://bypjcvlc15gsm" path="res://common/inventory/scripts/items/seed.gd" id="10_hb5m1"]
|
||||
[ext_resource type="Resource" uid="uid://dsctivn1vrem2" path="res://entities/plants/resources/plants/maias.tres" id="11_x5p1p"]
|
||||
[ext_resource type="PackedScene" uid="uid://dj7gp3crtg2yt" path="res://entities/camera/camera.tscn" id="12_qhcbd"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qt76e"]
|
||||
atlas = ExtResource("8_boyg6")
|
||||
region = Rect2(1140, 345, 141, 128)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_lc2xo"]
|
||||
script = ExtResource("10_hb5m1")
|
||||
plant_type = ExtResource("9_e36ub")
|
||||
name = "Chardi"
|
||||
description = "This plant reduce contamination around when it becomes mature."
|
||||
icon = SubResource("AtlasTexture_qt76e")
|
||||
metadata/_custom_type_script = "uid://bypjcvlc15gsm"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_215e1"]
|
||||
script = ExtResource("10_hb5m1")
|
||||
plant_type = ExtResource("9_e36ub")
|
||||
name = "Chardi"
|
||||
description = "This plant reduce contamination around when it becomes mature."
|
||||
icon = SubResource("AtlasTexture_qt76e")
|
||||
metadata/_custom_type_script = "uid://bypjcvlc15gsm"
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_sri3b"]
|
||||
atlas = ExtResource("8_boyg6")
|
||||
region = Rect2(1697, 331, 125, 158)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7sc4i"]
|
||||
script = ExtResource("10_hb5m1")
|
||||
plant_type = ExtResource("11_x5p1p")
|
||||
name = "Maias"
|
||||
description = "This gorgeous flower has no effect, but produce a lot of seeds."
|
||||
icon = SubResource("AtlasTexture_sri3b")
|
||||
metadata/_custom_type_script = "uid://bypjcvlc15gsm"
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="RootGui" parent="CanvasLayer" instance=ExtResource("1_iotsf")]
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="Pause" parent="CanvasLayer" instance=ExtResource("2_215e1")]
|
||||
process_mode = 3
|
||||
visible = false
|
||||
z_index = 1000
|
||||
|
||||
[node name="Win" parent="CanvasLayer" instance=ExtResource("3_7sc4i")]
|
||||
visible = false
|
||||
|
||||
[node name="Entities" type="Node2D" parent="."]
|
||||
y_sort_enabled = true
|
||||
|
||||
[node name="Player" parent="Entities" instance=ExtResource("2_lc2xo")]
|
||||
|
||||
[node name="ShovelObject" type="Area2D" parent="Entities"]
|
||||
position = Vector2(2, 72)
|
||||
script = ExtResource("3_215e1")
|
||||
item = ExtResource("6_lc2xo")
|
||||
metadata/_custom_type_script = "uid://dedg615xudpoq"
|
||||
|
||||
[node name="Planet" parent="." node_paths=PackedStringArray("import_entities_from_node") instance=ExtResource("6_e8heu")]
|
||||
loot_items = Array[ExtResource("7_rvswv")]([SubResource("Resource_lc2xo"), SubResource("Resource_215e1"), SubResource("Resource_7sc4i")])
|
||||
import_entities_from_node = NodePath("../Entities")
|
||||
|
||||
[node name="Camera" parent="." node_paths=PackedStringArray("following") instance=ExtResource("12_qhcbd")]
|
||||
position = Vector2(2.22, 0)
|
||||
following = NodePath("../Entities/Player")
|
||||
|
||||
[connection signal="day_pass_finished" from="CanvasLayer/RootGui" to="Entities/Player" method="_on_root_gui_day_pass_finished"]
|
||||
[connection signal="day_pass_finished" from="CanvasLayer/RootGui" to="Planet" method="_on_root_gui_day_pass_finished"]
|
||||
[connection signal="day_pass_pressed" from="CanvasLayer/RootGui" to="Entities/Player" method="_on_root_gui_day_pass_pressed"]
|
||||
[connection signal="day_pass_proceed" from="CanvasLayer/RootGui" to="Planet" method="_on_root_gui_day_pass_proceed"]
|
||||
[connection signal="game_click" from="CanvasLayer/RootGui" to="Entities/Player" method="_on_root_gui_game_click"]
|
||||
[connection signal="pause_asked" from="CanvasLayer/RootGui" to="CanvasLayer/Pause" method="_on_root_gui_pause_asked"]
|
||||
[connection signal="action_tried_without_energy" from="Entities/Player" to="CanvasLayer/RootGui" method="_on_player_action_tried_without_energy"]
|
||||
[connection signal="player_updated" from="Entities/Player" to="CanvasLayer/RootGui" method="_on_player_updated"]
|
||||
[connection signal="day_limit_exceed" from="Planet" to="CanvasLayer/Win" method="_on_planet_day_limit_exceed"]
|
||||
[connection signal="planet_updated" from="Planet" to="CanvasLayer/RootGui" method="_on_planet_updated"]
|
||||
|
Before Width: | Height: | Size: 887 B After Width: | Height: | Size: 887 B |
@ -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]
|
||||
|
||||
|
Before Width: | Height: | Size: 294 KiB After Width: | Height: | Size: 294 KiB |
@ -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]
|
||||
|
||||
|
Before Width: | Height: | Size: 285 KiB After Width: | Height: | Size: 285 KiB |
@ -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]
|
||||
|
||||
@ -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"]
|
||||
1
gui/game/pause/assets/icons/logout.svg
Normal 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 |
37
gui/game/pause/assets/icons/logout.svg.import
Normal 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
|
||||
1
gui/game/pause/assets/icons/player-pause.svg
Normal 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 |
37
gui/game/pause/assets/icons/player-pause.svg.import
Normal 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
|
||||
1
gui/game/pause/assets/icons/player-play.svg
Normal 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 |
37
gui/game/pause/assets/icons/player-play.svg.import
Normal 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
|
||||
1
gui/game/pause/assets/icons/rotate.svg
Normal 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 |
37
gui/game/pause/assets/icons/rotate.svg.import
Normal 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
@ -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"]
|
||||
27
gui/game/pause/scripts/pause.gd
Normal 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
|
||||
1
gui/game/pause/scripts/pause.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://crt2d4m5ba25i
|
||||
|
Before Width: | Height: | Size: 285 KiB After Width: | Height: | Size: 285 KiB |
@ -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]
|
||||
|
||||
@ -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")
|
||||
@ -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)
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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()
|
||||
19
gui/game/win/scripts/win.gd
Normal 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)
|
||||
1
gui/game/win/scripts/win.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://b3wuxv04clyed
|
||||
94
gui/game/win/win.tscn
Normal 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"]
|
||||
BIN
gui/menu/assets/texture/SeedingPlanetsLogo.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
34
gui/menu/assets/texture/SeedingPlanetsLogo.png.import
Normal 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
|
||||
BIN
gui/menu/assets/texture/abre1glow.png
Normal file
|
After Width: | Height: | Size: 567 KiB |
34
gui/menu/assets/texture/abre1glow.png.import
Normal 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
@ -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)
|
||||
1
gui/menu/scripts/menu.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://c54457tbocdwk
|
||||
@ -56,6 +56,11 @@ drop={
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":90,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
pause={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[rendering]
|
||||
|
||||
|
||||
159
root.tscn
@ -1,89 +1,94 @@
|
||||
[gd_scene load_steps=19 format=3 uid="uid://c5bruelvqbm1k"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://c5bruelvqbm1k"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://12nak7amd1uq" path="res://gui/root_gui.tscn" id="1_jnlp7"]
|
||||
[ext_resource type="PackedScene" uid="uid://tsi5j1uxppa4" path="res://stages/terrain/planet/planet.tscn" id="1_pyidc"]
|
||||
[ext_resource type="PackedScene" uid="uid://bgvbgeq46wee2" path="res://entities/player/player.tscn" id="2_vvh5c"]
|
||||
[ext_resource type="Script" uid="uid://dedg615xudpoq" path="res://entities/interactables/item_object/script/item_object.gd" id="3_bf3um"]
|
||||
[ext_resource type="PackedScene" uid="uid://dj7gp3crtg2yt" path="res://entities/camera/camera.tscn" id="3_vvh5c"]
|
||||
[ext_resource type="Texture2D" uid="uid://bf6nw4onkhavr" path="res://common/inventory/assets/icons/shovel.svg" id="4_huihk"]
|
||||
[ext_resource type="Script" uid="uid://dya38x1h1uiyg" path="res://common/inventory/scripts/items/shovel.gd" id="5_qw60f"]
|
||||
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="6_tw3kd"]
|
||||
[ext_resource type="Script" uid="uid://bypjcvlc15gsm" path="res://common/inventory/scripts/items/seed.gd" id="9_gd4vy"]
|
||||
[ext_resource type="Resource" uid="uid://b04vho33bl52b" path="res://entities/plants/resources/plants/default.tres" id="9_qw60f"]
|
||||
[ext_resource type="Resource" uid="uid://dsctivn1vrem2" path="res://entities/plants/resources/plants/maias.tres" id="11_eji0w"]
|
||||
[ext_resource type="Script" uid="uid://bq7admu4ahs5r" path="res://common/inventory/scripts/item.gd" id="12_sq7yr"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_qt76e"]
|
||||
script = ExtResource("5_qw60f")
|
||||
area_width = 50.0
|
||||
area_distance = 50.0
|
||||
name = "Shovel"
|
||||
description = ""
|
||||
icon = ExtResource("4_huihk")
|
||||
metadata/_custom_type_script = "uid://dya38x1h1uiyg"
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qt76e"]
|
||||
atlas = ExtResource("6_tw3kd")
|
||||
region = Rect2(1140, 345, 141, 128)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_sq7yr"]
|
||||
script = ExtResource("9_gd4vy")
|
||||
plant_type = ExtResource("9_qw60f")
|
||||
name = "Chardi"
|
||||
description = "This plant can grow without water, and reduce contamination around when it becomes mature."
|
||||
icon = SubResource("AtlasTexture_qt76e")
|
||||
metadata/_custom_type_script = "uid://bypjcvlc15gsm"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_blcw0"]
|
||||
script = ExtResource("9_gd4vy")
|
||||
plant_type = ExtResource("9_qw60f")
|
||||
name = "Chardi"
|
||||
description = "This plant can grow without water, and reduce contamination around when it becomes mature."
|
||||
icon = SubResource("AtlasTexture_qt76e")
|
||||
metadata/_custom_type_script = "uid://bypjcvlc15gsm"
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_sri3b"]
|
||||
atlas = ExtResource("6_tw3kd")
|
||||
region = Rect2(1697, 331, 125, 158)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_50g4q"]
|
||||
script = ExtResource("9_gd4vy")
|
||||
plant_type = ExtResource("11_eji0w")
|
||||
name = "Maias"
|
||||
description = "This gorgeous flower has no effect, but produce a lot of seeds."
|
||||
icon = SubResource("AtlasTexture_sri3b")
|
||||
metadata/_custom_type_script = "uid://bypjcvlc15gsm"
|
||||
[ext_resource type="Script" uid="uid://c54457tbocdwk" path="res://gui/menu/scripts/menu.gd" id="1_bf3um"]
|
||||
[ext_resource type="Texture2D" uid="uid://bnrjnvceprxfn" path="res://stages/terrain/planet/assets/textures/sol_gamejam_normal.png" id="2_huihk"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcn4cq53h1qiy" path="res://stages/terrain/planet/resources/textures/sol_gamejam_fleurs_transp.png" id="3_tw3kd"]
|
||||
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/game/ressources/default_theme.tres" id="4_gd4vy"]
|
||||
[ext_resource type="Texture2D" uid="uid://nx4wxpr6mk8l" path="res://gui/menu/assets/texture/SeedingPlanetsLogo.png" id="5_qw60f"]
|
||||
[ext_resource type="Texture2D" uid="uid://03ijmo6xlytu" path="res://gui/menu/assets/texture/abre1glow.png" id="6_eji0w"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://gui/game/assets/icons/bolt.svg" id="7_qwhpj"]
|
||||
|
||||
[node name="Root" type="Node2D"]
|
||||
script = ExtResource("1_bf3um")
|
||||
start_scene_path = "uid://d28cp7a21kwou"
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="RootGui" parent="CanvasLayer" instance=ExtResource("1_jnlp7")]
|
||||
[node name="Background1" type="TextureRect" parent="CanvasLayer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("2_huihk")
|
||||
expand_mode = 2
|
||||
stretch_mode = 6
|
||||
|
||||
[node name="Entities" type="Node2D" parent="."]
|
||||
y_sort_enabled = true
|
||||
[node name="Background2" type="TextureRect" parent="CanvasLayer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("3_tw3kd")
|
||||
expand_mode = 2
|
||||
stretch_mode = 6
|
||||
|
||||
[node name="Player" parent="Entities" instance=ExtResource("2_vvh5c")]
|
||||
[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("4_gd4vy")
|
||||
|
||||
[node name="ItemObject" type="Area2D" parent="Entities"]
|
||||
position = Vector2(2, 72)
|
||||
script = ExtResource("3_bf3um")
|
||||
item = SubResource("Resource_qt76e")
|
||||
metadata/_custom_type_script = "uid://dedg615xudpoq"
|
||||
[node name="Logo" type="TextureRect" parent="CanvasLayer/MarginContainer"]
|
||||
z_index = 2
|
||||
custom_minimum_size = Vector2(500, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
texture = ExtResource("5_qw60f")
|
||||
expand_mode = 5
|
||||
stretch_mode = 4
|
||||
|
||||
[node name="Planet" parent="." node_paths=PackedStringArray("import_entities_from_node") instance=ExtResource("1_pyidc")]
|
||||
loot_items = Array[ExtResource("12_sq7yr")]([SubResource("Resource_sq7yr"), SubResource("Resource_blcw0"), SubResource("Resource_50g4q")])
|
||||
import_entities_from_node = NodePath("../Entities")
|
||||
[node name="Tree" type="TextureRect" parent="CanvasLayer/MarginContainer"]
|
||||
custom_minimum_size = Vector2(500, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
texture = ExtResource("6_eji0w")
|
||||
expand_mode = 4
|
||||
stretch_mode = 4
|
||||
|
||||
[node name="Camera" parent="." node_paths=PackedStringArray("following") instance=ExtResource("3_vvh5c")]
|
||||
position = Vector2(2.22, 0)
|
||||
following = NodePath("../Entities/Player")
|
||||
[node name="Start" type="Button" parent="CanvasLayer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
size_flags_vertical = 8
|
||||
theme = ExtResource("4_gd4vy")
|
||||
theme_override_font_sizes/font_size = 33
|
||||
text = "Start"
|
||||
icon = ExtResource("7_qwhpj")
|
||||
|
||||
[connection signal="day_pass_finished" from="CanvasLayer/RootGui" to="Entities/Player" method="_on_root_gui_day_pass_finished"]
|
||||
[connection signal="day_pass_finished" from="CanvasLayer/RootGui" to="Planet" method="_on_root_gui_day_pass_finished"]
|
||||
[connection signal="day_pass_pressed" from="CanvasLayer/RootGui" to="Entities/Player" method="_on_root_gui_day_pass_pressed"]
|
||||
[connection signal="day_pass_proceed" from="CanvasLayer/RootGui" to="Planet" method="_on_root_gui_day_pass_proceed"]
|
||||
[connection signal="game_click" from="CanvasLayer/RootGui" to="Entities/Player" method="_on_root_gui_game_click"]
|
||||
[connection signal="action_tried_without_energy" from="Entities/Player" to="CanvasLayer/RootGui" method="_on_player_action_tried_without_energy"]
|
||||
[connection signal="player_updated" from="Entities/Player" to="CanvasLayer/RootGui" method="_on_player_updated"]
|
||||
[connection signal="planet_updated" from="Planet" to="CanvasLayer/RootGui" method="_on_planet_updated"]
|
||||
[node name="Version" type="Label" parent="CanvasLayer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
size_flags_vertical = 0
|
||||
text = "Prototype 1"
|
||||
|
||||
[node name="Credits" type="Label" parent="CanvasLayer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 8
|
||||
text = "🎨 Art
|
||||
Céline Ferrand / Lunarde
|
||||
Camille Fleury
|
||||
|
||||
🖥️ Development / 🧩 Game Design
|
||||
Zacharie Guet / Zink
|
||||
Victor Robert Jaunet / Altaezio
|
||||
|
||||
🎸 Music
|
||||
Niels / Nilou"
|
||||
|
||||
[connection signal="pressed" from="CanvasLayer/MarginContainer/Start" to="." method="_on_start_pressed"]
|
||||
|
||||
@ -2,9 +2,9 @@ extends Terrain
|
||||
class_name Planet
|
||||
|
||||
signal planet_updated(planet : Planet)
|
||||
signal day_limit_exceed
|
||||
signal day_limit_exceed(planet : Planet)
|
||||
|
||||
const DAY_LIMIT : int = 3
|
||||
const DAY_LIMIT : int = 10
|
||||
const PLANET_TEXTURE_SCALE : float = 5.0
|
||||
|
||||
@export_group("Loot")
|
||||
@ -116,9 +116,6 @@ func is_there_contamination(point : Vector2) -> bool:
|
||||
|
||||
func pass_day():
|
||||
day += 1
|
||||
if day > DAY_LIMIT:
|
||||
day_limit_exceed.emit()
|
||||
else:
|
||||
for e : Node2D in entityContainer.get_children():
|
||||
if e.has_method("_pass_day"):
|
||||
e._pass_day()
|
||||
@ -132,9 +129,11 @@ func generate_loot(number : int = loot_number.pick_random()):
|
||||
|
||||
add_entity(loot)
|
||||
|
||||
var loot_random_range = UndergroundLoot.LOOTED_ITEM_RANDOM_RANGE
|
||||
|
||||
loot.global_position = Vector2(
|
||||
randf_range(0, terrainData.terrainSize.x),
|
||||
randf_range(0, terrainData.terrainSize.y)
|
||||
randf_range(loot_random_range, terrainData.terrainSize.x - loot_random_range),
|
||||
randf_range(loot_random_range, terrainData.terrainSize.y - loot_random_range)
|
||||
)
|
||||
|
||||
#endregion
|
||||
@ -144,3 +143,5 @@ func _on_root_gui_day_pass_proceed():
|
||||
|
||||
func _on_root_gui_day_pass_finished():
|
||||
decontamination_coverage = terrainData.get_decontamination_coverage()
|
||||
if day + 1 > DAY_LIMIT:
|
||||
day_limit_exceed.emit(self)
|
||||
|
||||