From e1b43a0de95079033047587d2ee453eda977b62c Mon Sep 17 00:00:00 2001 From: Zacharie Guet Date: Sun, 1 Sep 2024 22:29:11 +0200 Subject: [PATCH] Adding Tutorial and win screen --- Game.tscn | 1 + scenes/Gui.tscn | 78 ++++++++++++++++++++++++++++++++++++++++++++++++- scenes/Map.tscn | 2 +- 3 files changed, 79 insertions(+), 2 deletions(-) diff --git a/Game.tscn b/Game.tscn index b6741e8..e9423c1 100644 --- a/Game.tscn +++ b/Game.tscn @@ -21,6 +21,7 @@ script = ExtResource("3_7olyu") [node name="Planter" parent="." node_paths=PackedStringArray("camera") instance=ExtResource("3_qx0o7")] camera = NodePath("../Camera2D") +[connection signal="win_game" from="Map" to="Interface/Gui" method="_on_map_win_game"] [connection signal="scanner_selected" from="Interface/Gui" to="Map" method="_on_gui_scanner_selected"] [connection signal="mouse_motion" from="Camera2D" to="Interface/Gui" method="_on_camera_2d_mouse_motion"] [connection signal="seed_list_updated" from="Planter" to="Interface/Gui" method="_on_planter_seed_list_updated"] diff --git a/scenes/Gui.tscn b/scenes/Gui.tscn index aa213b8..c4f0a33 100644 --- a/scenes/Gui.tscn +++ b/scenes/Gui.tscn @@ -1,9 +1,20 @@ -[gd_scene load_steps=5 format=3 uid="uid://dha8pa1les53a"] +[gd_scene load_steps=11 format=3 uid="uid://dha8pa1les53a"] [ext_resource type="Script" path="res://scripts/gui.gd" id="1_6gq27"] [ext_resource type="PackedScene" uid="uid://bm8nlb7kmaa6k" path="res://objects/gui/Seed_queue.tscn" id="1_lh8u1"] [ext_resource type="PackedScene" uid="uid://iaf4md4cbwqh" path="res://objects/gui/Seed_card.tscn" id="2_bt3vo"] [ext_resource type="PackedScene" uid="uid://0so4tpnkk8t2" path="res://objects/gui/Scanner_modes.tscn" id="3_bsm7r"] +[ext_resource type="Script" path="res://scripts/tuto.gd" id="5_5h6w8"] +[ext_resource type="Texture2D" uid="uid://dqogq148ksscp" path="res://assets/sprites/robot/walk/frame_01.png" id="5_kwcrh"] +[ext_resource type="Theme" uid="uid://dnebunkx13tbr" path="res://assets/gui/Text.tres" id="6_tw1fh"] +[ext_resource type="AudioStream" uid="uid://n7seb2bqfped" path="res://assets/sounds/Dialogue.mp3" id="8_8y3ei"] + +[sub_resource type="LabelSettings" id="LabelSettings_kryjr"] +font_size = 20 + +[sub_resource type="LabelSettings" id="LabelSettings_y5jk3"] +font_size = 22 +font_color = Color(0.882353, 0.6, 0.145098, 1) [node name="Gui" type="Control"] layout_mode = 3 @@ -38,4 +49,69 @@ mouse_filter = 1 [node name="ScannerModes" parent="MarginContainer" instance=ExtResource("3_bsm7r")] layout_mode = 2 +[node name="Tuto" type="Control" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("5_5h6w8") + +[node name="ColorRect" type="ColorRect" parent="Tuto"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.08, 0.0432, 0.0793867, 0.803922) + +[node name="MarginContainer" type="MarginContainer" parent="Tuto"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 20 +theme_override_constants/margin_top = 20 +theme_override_constants/margin_right = 20 +theme_override_constants/margin_bottom = 20 + +[node name="TextureRect" type="TextureRect" parent="Tuto/MarginContainer"] +custom_minimum_size = Vector2(300, 300) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 8 +texture = ExtResource("5_kwcrh") +expand_mode = 1 +stretch_mode = 5 + +[node name="Text" type="Label" parent="Tuto/MarginContainer"] +custom_minimum_size = Vector2(600, 256.175) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 8 +theme = ExtResource("6_tw1fh") +text = "Hi there ! +Welcome to GJ 238 B, an awesome exoplanet that somehow, dsddsdsd sdsdd sdsd s sdssd sdsdsdsdd dsdddsd" +label_settings = SubResource("LabelSettings_kryjr") +horizontal_alignment = 1 +vertical_alignment = 1 +autowrap_mode = 2 + +[node name="Label2" type="Label" parent="Tuto/MarginContainer"] +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 +theme = ExtResource("6_tw1fh") +text = "Click to continue" +label_settings = SubResource("LabelSettings_y5jk3") +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="RobotSpeak" type="AudioStreamPlayer" parent="Tuto"] +stream = ExtResource("8_8y3ei") + [connection signal="scanner_selected" from="MarginContainer/ScannerModes" to="." method="_on_scanner_modes_scanner_selected"] diff --git a/scenes/Map.tscn b/scenes/Map.tscn index 30808bf..70e5aa1 100644 --- a/scenes/Map.tscn +++ b/scenes/Map.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://scripts/map.gd" id="1_3np0o"] [ext_resource type="PackedScene" uid="uid://6ferubyu2uy1" path="res://scenes/Scanners.tscn" id="1_6mlj0"] -[ext_resource type="PackedScene" uid="uid://cj457q2fx5mim" path="res://objects/Animal.tscn" id="4_pkphc"] +[ext_resource type="PackedScene" uid="uid://byv2a5d0n1538" path="res://objects/Animal.tscn" id="4_pkphc"] [ext_resource type="Texture2D" uid="uid://c84bc7d0f8gtn" path="res://assets/texture/sky.png" id="4_uy8vn"] [ext_resource type="Texture2D" uid="uid://bkwi6yurko7gm" path="res://assets/texture/sol_gamejam_fleurs.png" id="5_6sl35"] [ext_resource type="Shader" path="res://scripts/shaders/TextureSplit.gdshader" id="5_iqvbx"]