Compare commits

...

2 Commits

Author SHA1 Message Date
e1b43a0de9 Adding Tutorial and win screen 2024-09-01 22:29:11 +02:00
68a5b8f305 Adding plant animation 2024-09-01 22:28:18 +02:00
4 changed files with 122 additions and 3 deletions

View File

@ -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"]

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=6 format=3 uid="uid://x4kv2y5f52cm"]
[gd_scene load_steps=9 format=3 uid="uid://x4kv2y5f52cm"]
[ext_resource type="Script" path="res://scripts/plant.gd" id="1_drvq1"]
[ext_resource type="Texture2D" uid="uid://b3kjaw1hajc6s" path="res://assets/grille_seeds.png" id="1_n5onq"]
@ -21,6 +21,43 @@ animations = [{
[sub_resource type="CircleShape2D" id="CircleShape2D_jksuk"]
radius = 36.0
[sub_resource type="Animation" id="Animation_3tubk"]
resource_name = "Growing"
length = 0.4
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("AnimatedSprite2D:scale")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.2, 0.4),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector2(0.1, 0.1), Vector2(0.12, 0.3), Vector2(0.2, 0.2)]
}
[sub_resource type="Animation" id="Animation_fcus3"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("AnimatedSprite2D:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0.2, 0.2)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_da8e6"]
_data = {
"Growing": SubResource("Animation_3tubk"),
"RESET": SubResource("Animation_fcus3")
}
[node name="Plant" type="Node2D"]
script = ExtResource("1_drvq1")
@ -45,6 +82,11 @@ offset = Vector2(0, -250)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource("CircleShape2D_jksuk")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_da8e6")
}
[connection signal="timeout" from="Growing" to="." method="_on_growing_timeout"]
[connection signal="timeout" from="NeedChecker" to="." method="_on_need_checker_timeout"]
[connection signal="timeout" from="SaplingCountDown" to="." method="_on_sapling_count_down_timeout"]

View File

@ -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"]

View File

@ -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"]