From 320c58250792fa6174970fdd6c5cf2a6146b541a Mon Sep 17 00:00:00 2001 From: Matteo Balugani Date: Mon, 2 Oct 2023 16:32:23 +0200 Subject: [PATCH 1/5] Furnace ready --- audio/conversione/drop_in_lava.wav | 3 + audio/conversione/drop_in_lava.wav.import | 24 +++++ audio/conversione/lava.wav | 3 + audio/conversione/lava.wav.import | 24 +++++ converters/converter.gd | 3 + .../item_converter/furnace_converter.tscn | 88 ------------------- converters/item_converter/item_converter.tscn | 36 +++++--- game/game.tscn | 16 +++- 8 files changed, 94 insertions(+), 103 deletions(-) create mode 100644 audio/conversione/drop_in_lava.wav create mode 100644 audio/conversione/drop_in_lava.wav.import create mode 100644 audio/conversione/lava.wav create mode 100644 audio/conversione/lava.wav.import delete mode 100644 converters/item_converter/furnace_converter.tscn diff --git a/audio/conversione/drop_in_lava.wav b/audio/conversione/drop_in_lava.wav new file mode 100644 index 0000000..5979d16 --- /dev/null +++ b/audio/conversione/drop_in_lava.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b45eadc11690c63568c572fbbc0a0a5dfb7a1fe22c5cfb06a4bdf291b634e8e0 +size 89044 diff --git a/audio/conversione/drop_in_lava.wav.import b/audio/conversione/drop_in_lava.wav.import new file mode 100644 index 0000000..54c2f36 --- /dev/null +++ b/audio/conversione/drop_in_lava.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://du16ilpv6gmxd" +path="res://.godot/imported/drop_in_lava.wav-d8564f2442e0be55cb7f8cc5bb24444b.sample" + +[deps] + +source_file="res://audio/conversione/drop_in_lava.wav" +dest_files=["res://.godot/imported/drop_in_lava.wav-d8564f2442e0be55cb7f8cc5bb24444b.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/audio/conversione/lava.wav b/audio/conversione/lava.wav new file mode 100644 index 0000000..9a321a4 --- /dev/null +++ b/audio/conversione/lava.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6226df69f9d1c013ef663c51c7da3bcd429bb06a84078a70bfd86920b57d1950 +size 591270 diff --git a/audio/conversione/lava.wav.import b/audio/conversione/lava.wav.import new file mode 100644 index 0000000..ea96b08 --- /dev/null +++ b/audio/conversione/lava.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://dv1e0wiiquxp0" +path="res://.godot/imported/lava.wav-673d1274334b931ccacf184957a397bc.sample" + +[deps] + +source_file="res://audio/conversione/lava.wav" +dest_files=["res://.godot/imported/lava.wav-673d1274334b931ccacf184957a397bc.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/converters/converter.gd b/converters/converter.gd index 5026b33..bd9b380 100644 --- a/converters/converter.gd +++ b/converters/converter.gd @@ -4,6 +4,7 @@ class_name Converter var coda : int = 0 @export var sprite_front: AnimatedSprite2D +@export var sprite_back: AnimatedSprite2D @export var conversion_timer: Timer @export var sound_working: AudioStreamPlayer @export var sound_complete: AudioStreamPlayer @@ -15,12 +16,14 @@ func _on_collector_goal(): func _process(_delta): if coda>=1 and conversion_timer.is_stopped(): sprite_front.play() + sprite_back.play() conversion_timer.start() sound_working.play() func _on_timer_timeout(): coda-=1 sprite_front.stop() + sprite_back.play() sound_working.stop() sound_complete.play() spawner.spawn() diff --git a/converters/item_converter/furnace_converter.tscn b/converters/item_converter/furnace_converter.tscn deleted file mode 100644 index 073262f..0000000 --- a/converters/item_converter/furnace_converter.tscn +++ /dev/null @@ -1,88 +0,0 @@ -[gd_scene load_steps=12 format=3 uid="uid://c0hcrkf1s2mww"] - -[ext_resource type="Script" path="res://converters/converter.gd" id="1_h0rfu"] -[ext_resource type="Texture2D" uid="uid://440yhlpwpfw4" path="res://converters/copper_to_silver/copper_converter_back.png" id="2_dgtpa"] -[ext_resource type="PackedScene" uid="uid://c5w3b55aiui6c" path="res://collector/collector.tscn" id="3_t872f"] -[ext_resource type="PackedScene" uid="uid://c67lfbk4gf1ga" path="res://spawner/spawner.tscn" id="4_jko1c"] -[ext_resource type="PackedScene" uid="uid://dme22vvfgme5f" path="res://entity/coin_silver/coin_silver.tscn" id="5_4nt0s"] -[ext_resource type="AudioStream" uid="uid://br25ip30mu174" path="res://audio/conversione/mechanic_sound.wav" id="6_4vucc"] -[ext_resource type="AudioStream" uid="uid://7tw5efuo3gxj" path="res://audio/conversione/coin_to_coin.wav" id="7_dw32b"] - -[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_aslkt"] -radius = 1.5 -height = 28.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_31dtl"] -size = Vector2(26, 4) - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_k11if"] -size = Vector2(26, 5) - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_jeo5f"] -size = Vector2(26, 8.83334) - -[node name="ItemConverter" type="StaticBody2D"] -scale = Vector2(3, 3) -script = ExtResource("1_h0rfu") - -[node name="SpriteBack" type="Sprite2D" parent="."] -z_index = -2 -texture_filter = 1 -texture = ExtResource("2_dgtpa") - -[node name="LeftWall" type="CollisionShape2D" parent="."] -z_index = 2 -position = Vector2(-14.5, -3) -shape = SubResource("CapsuleShape2D_aslkt") - -[node name="RightWall" type="CollisionShape2D" parent="."] -z_index = 2 -position = Vector2(14.5, -3) -shape = SubResource("CapsuleShape2D_aslkt") - -[node name="InnerWall" type="CollisionShape2D" parent="."] -z_index = 3 -position = Vector2(0, 4.5) -rotation = 3.14159 -shape = SubResource("RectangleShape2D_31dtl") - -[node name="Collector" parent="." instance=ExtResource("3_t872f")] -z_index = 2 -collecting_types = Array[StringName]([&"Copper"]) -collecting_amount = 10 - -[node name="CollectShape" type="CollisionShape2D" parent="Collector"] -shape = SubResource("RectangleShape2D_k11if") -debug_color = Color(0, 0.701961, 0.188235, 0.419608) - -[node name="Spawner" parent="." instance=ExtResource("4_jko1c")] -position = Vector2(0, 8) -scene = ExtResource("5_4nt0s") -buffer_cap = 1 -spawn_rect = Rect2(-8, 0, 16, 4) -spawn_rotation_degrees_min = 80.0 -spawn_rotation_degrees_max = 100.0 -overlapping_body_count_limit = 4 - -[node name="PreventSpawnShape" type="CollisionShape2D" parent="Spawner"] -z_index = 3 -position = Vector2(0, 3.5) -shape = SubResource("RectangleShape2D_jeo5f") -debug_color = Color(0.701961, 0, 0, 0.419608) - -[node name="ConversionTimer" type="Timer" parent="."] -wait_time = 0.5 -one_shot = true - -[node name="SoundAbsorb" type="AudioStreamPlayer" parent="."] -stream = ExtResource("6_4vucc") - -[node name="SoundWorking" type="AudioStreamPlayer" parent="."] -stream = ExtResource("6_4vucc") - -[node name="SoundComplete" type="AudioStreamPlayer" parent="."] -stream = ExtResource("7_dw32b") - -[connection signal="collected" from="Collector" to="." method="_on_collector_collected" flags=18] -[connection signal="goal" from="Collector" to="." method="_on_collector_goal" flags=18] -[connection signal="timeout" from="ConversionTimer" to="." method="_on_timer_timeout" flags=18] diff --git a/converters/item_converter/item_converter.tscn b/converters/item_converter/item_converter.tscn index 4b97a2e..4083a73 100644 --- a/converters/item_converter/item_converter.tscn +++ b/converters/item_converter/item_converter.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=33 format=3 uid="uid://ddrhfhebwtq5"] +[gd_scene load_steps=34 format=3 uid="uid://ddrhfhebwtq5"] [ext_resource type="Script" path="res://converters/converter.gd" id="1_qln0a"] [ext_resource type="Texture2D" uid="uid://devcho3gaigt0" path="res://converters/item_converter/item_converter_back_1.png" id="2_136t7"] @@ -9,13 +9,14 @@ [ext_resource type="PackedScene" uid="uid://dme22vvfgme5f" path="res://entity/coin_silver/coin_silver.tscn" id="5_fp5qt"] [ext_resource type="Texture2D" uid="uid://c4vpmiwjfvcpy" path="res://converters/item_converter/item_converter_back_4.png" id="5_lk4ym"] [ext_resource type="Texture2D" uid="uid://c0kstbgsm65vq" path="res://converters/item_converter/item_converter_back_5.png" id="6_io2km"] -[ext_resource type="AudioStream" uid="uid://br25ip30mu174" path="res://audio/conversione/mechanic_sound.wav" id="6_w6x4p"] [ext_resource type="Texture2D" uid="uid://crnu1x5n33yqu" path="res://converters/item_converter/item_converter_front_1.png" id="7_khayw"] -[ext_resource type="AudioStream" uid="uid://7tw5efuo3gxj" path="res://audio/conversione/coin_to_coin.wav" id="7_x4ti3"] [ext_resource type="Texture2D" uid="uid://b0vkliltyaljc" path="res://converters/item_converter/item_converter_front_2.png" id="8_w6rnl"] [ext_resource type="Texture2D" uid="uid://fqerky4lyps8" path="res://converters/item_converter/item_converter_front_3.png" id="9_88mk7"] [ext_resource type="Texture2D" uid="uid://bw0jgw0jen4lg" path="res://converters/item_converter/item_converter_front_4.png" id="10_fjv52"] [ext_resource type="Texture2D" uid="uid://4tg81ksibacf" path="res://converters/item_converter/item_converter_front_5.png" id="11_cg5dk"] +[ext_resource type="AudioStream" uid="uid://du16ilpv6gmxd" path="res://audio/conversione/drop_in_lava.wav" id="15_nahnf"] +[ext_resource type="AudioStream" uid="uid://dv1e0wiiquxp0" path="res://audio/conversione/lava.wav" id="16_ptmks"] +[ext_resource type="AudioStream" uid="uid://cc4mqxq6mxmdg" path="res://audio/conversione/coin_to_gem.wav" id="17_58rct"] [sub_resource type="AtlasTexture" id="AtlasTexture_uqtie"] atlas = ExtResource("2_136t7") @@ -116,20 +117,27 @@ size = Vector2(26, 5) [sub_resource type="RectangleShape2D" id="RectangleShape2D_jeo5f"] size = Vector2(26, 8.83334) -[node name="ItemConverter" type="StaticBody2D"] +[node name="ItemConverter" type="StaticBody2D" node_paths=PackedStringArray("sprite_front", "sprite_back", "conversion_timer", "sound_working", "sound_complete", "spawner")] scale = Vector2(3, 3) script = ExtResource("1_qln0a") +sprite_front = NodePath("SpriteFront") +sprite_back = NodePath("SpriteBack") +conversion_timer = NodePath("ConversionTimer") +sound_working = NodePath("SoundWorking") +sound_complete = NodePath("SoundAbsorb") +spawner = NodePath("Spawner") [node name="SpriteBack" type="AnimatedSprite2D" parent="."] texture_filter = 1 position = Vector2(0, -14) sprite_frames = SubResource("SpriteFrames_psnir") -frame_progress = 0.0929807 +frame_progress = 0.883907 [node name="SpriteFront" type="AnimatedSprite2D" parent="."] +z_index = 2 texture_filter = 1 sprite_frames = SubResource("SpriteFrames_qqah4") -frame_progress = 0.859387 +frame_progress = 0.650314 [node name="LeftWall" type="CollisionShape2D" parent="."] z_index = 2 @@ -147,9 +155,10 @@ position = Vector2(0, 4.5) rotation = 3.14159 shape = SubResource("RectangleShape2D_31dtl") -[node name="Collector" parent="." instance=ExtResource("3_qehi7")] +[node name="Collector" parent="." node_paths=PackedStringArray("sound_absorb") instance=ExtResource("3_qehi7")] z_index = 2 -collecting_types = Array[StringName]([&"Copper"]) +collecting_types = Array[StringName]([&"Gold"]) +sound_absorb = NodePath("../SoundAbsorb") collecting_amount = 10 [node name="CollectShape" type="CollisionShape2D" parent="Collector"] @@ -176,13 +185,18 @@ wait_time = 0.5 one_shot = true [node name="SoundAbsorb" type="AudioStreamPlayer" parent="."] -stream = ExtResource("6_w6x4p") +stream = ExtResource("15_nahnf") [node name="SoundWorking" type="AudioStreamPlayer" parent="."] -stream = ExtResource("6_w6x4p") +stream = ExtResource("16_ptmks") [node name="SoundComplete" type="AudioStreamPlayer" parent="."] -stream = ExtResource("7_x4ti3") +stream = ExtResource("17_58rct") + +[node name="SpriteBack2" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +sprite_frames = SubResource("SpriteFrames_psnir") +frame_progress = 0.228399 [connection signal="collected" from="Collector" to="." method="_on_collector_collected" flags=18] [connection signal="goal" from="Collector" to="." method="_on_collector_goal" flags=18] diff --git a/game/game.tscn b/game/game.tscn index 397e99a..3aac1b5 100644 --- a/game/game.tscn +++ b/game/game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=22 format=3 uid="uid://c3rxmcwa5nqng"] +[gd_scene load_steps=23 format=3 uid="uid://c3rxmcwa5nqng"] [ext_resource type="Script" path="res://game/game.gd" id="1_i3ly0"] [ext_resource type="PackedScene" uid="uid://bllsprv8orpn4" path="res://bottle/bottle.tscn" id="1_y7o2l"] @@ -16,6 +16,7 @@ [ext_resource type="Theme" uid="uid://ba5utvfhnxa5i" path="res://interface/interface_theme.tres" id="10_sayqn"] [ext_resource type="Texture2D" uid="uid://c8pvjgtr2ufjl" path="res://interface/upgrade_copper.png" id="11_lt33g"] [ext_resource type="PackedScene" uid="uid://c4ew8x4gch275" path="res://converters/gold_to_gem/gem_converter.tscn" id="16_e62br"] +[ext_resource type="PackedScene" uid="uid://ddrhfhebwtq5" path="res://converters/item_converter/item_converter.tscn" id="17_fi36f"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_4uksi"] size = Vector2(80, 80) @@ -81,7 +82,7 @@ shape = SubResource("RectangleShape2D_rh35r") debug_color = Color(0, 0.6, 0.701961, 0) [node name="CopperConverter" parent="." instance=ExtResource("7_ipeok")] -position = Vector2(56, 390) +position = Vector2(-85, 454) metadata/_edit_group_ = true [node name="Spawner" parent="CopperConverter" index="6" node_paths=PackedStringArray("target")] @@ -91,7 +92,7 @@ target = NodePath("../..") position = Vector2(0, 4.08333) [node name="SilverConverter" parent="." instance=ExtResource("8_0bbpi")] -position = Vector2(53, 273) +position = Vector2(-86, 321) rotation = -6.28319 metadata/_edit_group_ = true @@ -179,12 +180,18 @@ shape = SubResource("RectangleShape2D_jed57") debug_color = Color(0, 0, 0, 0.419608) [node name="GemConverter" parent="." instance=ExtResource("16_e62br")] -position = Vector2(145, 180) +position = Vector2(-89, 203) metadata/_edit_group_ = true [node name="Spawner" parent="GemConverter" index="6" node_paths=PackedStringArray("target")] target = NodePath("../..") +[node name="ItemConverter" parent="." instance=ExtResource("17_fi36f")] +position = Vector2(136, 378) + +[node name="Spawner" parent="ItemConverter" index="6" node_paths=PackedStringArray("target")] +target = NodePath("../..") + [connection signal="timeout" from="TimeSpawner/Timer" to="TimeSpawner" method="spawn"] [connection signal="changed" from="Evaluator" to="." method="_on_score_changed"] [connection signal="collected" from="StoreCollector" to="." method="_on_store_collector_collected"] @@ -192,3 +199,4 @@ target = NodePath("../..") [editable path="CopperConverter"] [editable path="SilverConverter"] [editable path="GemConverter"] +[editable path="ItemConverter"] From b15931b7d84cb35316d7c4a6d7ee3b8b63d7cf2f Mon Sep 17 00:00:00 2001 From: Matteo Balugani Date: Mon, 2 Oct 2023 16:50:01 +0200 Subject: [PATCH 2/5] bugfix fornace --- audio/conversione/new_item.wav | 3 +++ audio/conversione/new_item.wav.import | 24 +++++++++++++++++++ bottle/bottle.tscn | 4 ++-- collector/collector.tscn | 13 ++++++---- converters/converter.gd | 2 +- .../copper_to_silver/copper_converter.tscn | 7 +++--- converters/item_converter/item_converter.tscn | 8 +++---- entity/gem/gem.tscn | 2 +- game/game.tscn | 22 ++++++++++++----- main.tscn | 2 +- spawner/spawner.tscn | 2 -- 11 files changed, 65 insertions(+), 24 deletions(-) create mode 100644 audio/conversione/new_item.wav create mode 100644 audio/conversione/new_item.wav.import diff --git a/audio/conversione/new_item.wav b/audio/conversione/new_item.wav new file mode 100644 index 0000000..ffee2ca --- /dev/null +++ b/audio/conversione/new_item.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e8f14d62de9a55770e67b9cfd13acf4d6ed347708bc2ef9b2a9dba32bd35fd1 +size 501320 diff --git a/audio/conversione/new_item.wav.import b/audio/conversione/new_item.wav.import new file mode 100644 index 0000000..e439ecc --- /dev/null +++ b/audio/conversione/new_item.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://c0uhi1hrejyxg" +path="res://.godot/imported/new_item.wav-c96d0e51e4b995e42ca31990475b7ff3.sample" + +[deps] + +source_file="res://audio/conversione/new_item.wav" +dest_files=["res://.godot/imported/new_item.wav-c96d0e51e4b995e42ca31990475b7ff3.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/bottle/bottle.tscn b/bottle/bottle.tscn index fc6930b..4a862a0 100644 --- a/bottle/bottle.tscn +++ b/bottle/bottle.tscn @@ -105,8 +105,8 @@ texture = ExtResource("1_qvgnf") 4:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) [sub_resource type="TileSet" id="TileSet_tr7be"] -physics_layer_0/collision_layer = 2 -physics_layer_0/collision_mask = 0 +physics_layer_0/collision_layer = 3 +physics_layer_0/collision_mask = 3 physics_layer_0/physics_material = SubResource("PhysicsMaterial_y0g3v") sources/1 = SubResource("TileSetAtlasSource_6tyce") diff --git a/collector/collector.tscn b/collector/collector.tscn index 5eb872a..a7f738e 100644 --- a/collector/collector.tscn +++ b/collector/collector.tscn @@ -1,10 +1,15 @@ -[gd_scene load_steps=2 format=3 uid="uid://c5w3b55aiui6c"] +[gd_scene load_steps=3 format=3 uid="uid://c5w3b55aiui6c"] [ext_resource type="Script" path="res://collector/collector.gd" id="1_1xtt5"] +[ext_resource type="AudioStream" uid="uid://bpxjhl0aq3yrv" path="res://audio/conversione/suck2.wav" id="2_n0plc"] -[node name="Collector" type="Area2D"] -collision_layer = 0 -collision_mask = 4 +[node name="Collector" type="Area2D" node_paths=PackedStringArray("sound_absorb")] script = ExtResource("1_1xtt5") +sound_absorb = NodePath("sound_absorb") + +[node name="sound_absorb" type="AudioStreamPlayer" parent="."] +stream = ExtResource("2_n0plc") +volume_db = -8.0 +pitch_scale = 2.0 [connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/converters/converter.gd b/converters/converter.gd index bd9b380..b098484 100644 --- a/converters/converter.gd +++ b/converters/converter.gd @@ -23,7 +23,7 @@ func _process(_delta): func _on_timer_timeout(): coda-=1 sprite_front.stop() - sprite_back.play() + sprite_back.stop() sound_working.stop() sound_complete.play() spawner.spawn() diff --git a/converters/copper_to_silver/copper_converter.tscn b/converters/copper_to_silver/copper_converter.tscn index 6ae1582..3cccf4a 100644 --- a/converters/copper_to_silver/copper_converter.tscn +++ b/converters/copper_to_silver/copper_converter.tscn @@ -59,12 +59,10 @@ size = Vector2(26, 4) size = Vector2(26, 5) [sub_resource type="RectangleShape2D" id="RectangleShape2D_jeo5f"] -size = Vector2(26, 10) +size = Vector2(26, 8.83334) [node name="CopperConverter" type="StaticBody2D" node_paths=PackedStringArray("sprite_front", "conversion_timer", "sound_working", "sound_complete", "spawner")] scale = Vector2(3, 3) -collision_layer = 8 -collision_mask = 0 script = ExtResource("1_mas6k") sprite_front = NodePath("SpriteFront") conversion_timer = NodePath("ConversionTimer") @@ -126,6 +124,9 @@ debug_color = Color(0.701961, 0, 0, 0.419608) wait_time = 0.5 one_shot = true +[node name="SoundAbsorb" type="AudioStreamPlayer" parent="."] +stream = ExtResource("10_6hhch") + [node name="SoundWorking" type="AudioStreamPlayer" parent="."] stream = ExtResource("10_6hhch") diff --git a/converters/item_converter/item_converter.tscn b/converters/item_converter/item_converter.tscn index 4083a73..b27c11d 100644 --- a/converters/item_converter/item_converter.tscn +++ b/converters/item_converter/item_converter.tscn @@ -16,7 +16,7 @@ [ext_resource type="Texture2D" uid="uid://4tg81ksibacf" path="res://converters/item_converter/item_converter_front_5.png" id="11_cg5dk"] [ext_resource type="AudioStream" uid="uid://du16ilpv6gmxd" path="res://audio/conversione/drop_in_lava.wav" id="15_nahnf"] [ext_resource type="AudioStream" uid="uid://dv1e0wiiquxp0" path="res://audio/conversione/lava.wav" id="16_ptmks"] -[ext_resource type="AudioStream" uid="uid://cc4mqxq6mxmdg" path="res://audio/conversione/coin_to_gem.wav" id="17_58rct"] +[ext_resource type="AudioStream" uid="uid://c0uhi1hrejyxg" path="res://audio/conversione/new_item.wav" id="17_4wm4w"] [sub_resource type="AtlasTexture" id="AtlasTexture_uqtie"] atlas = ExtResource("2_136t7") @@ -124,7 +124,7 @@ sprite_front = NodePath("SpriteFront") sprite_back = NodePath("SpriteBack") conversion_timer = NodePath("ConversionTimer") sound_working = NodePath("SoundWorking") -sound_complete = NodePath("SoundAbsorb") +sound_complete = NodePath("SoundComplete") spawner = NodePath("Spawner") [node name="SpriteBack" type="AnimatedSprite2D" parent="."] @@ -137,7 +137,6 @@ frame_progress = 0.883907 z_index = 2 texture_filter = 1 sprite_frames = SubResource("SpriteFrames_qqah4") -frame_progress = 0.650314 [node name="LeftWall" type="CollisionShape2D" parent="."] z_index = 2 @@ -186,12 +185,13 @@ one_shot = true [node name="SoundAbsorb" type="AudioStreamPlayer" parent="."] stream = ExtResource("15_nahnf") +volume_db = -12.291 [node name="SoundWorking" type="AudioStreamPlayer" parent="."] stream = ExtResource("16_ptmks") [node name="SoundComplete" type="AudioStreamPlayer" parent="."] -stream = ExtResource("17_58rct") +stream = ExtResource("17_4wm4w") [node name="SpriteBack2" type="AnimatedSprite2D" parent="."] texture_filter = 1 diff --git a/entity/gem/gem.tscn b/entity/gem/gem.tscn index ec92543..bfa6cf6 100644 --- a/entity/gem/gem.tscn +++ b/entity/gem/gem.tscn @@ -35,7 +35,7 @@ texture = ExtResource("3_6jejy") shader = ExtResource("5_v6ppl") [node name="Collectible" parent="." instance=ExtResource("4_idoeu")] -type = &"Gem" +type = &"Silver" [node name="Valuable" parent="." instance=ExtResource("5_7bd6c")] value = 10 diff --git a/game/game.tscn b/game/game.tscn index ae72a4d..4699ae6 100644 --- a/game/game.tscn +++ b/game/game.tscn @@ -8,14 +8,15 @@ [ext_resource type="PackedScene" uid="uid://c3kitncwpi42j" path="res://entity/coin_copper/coin_copper.tscn" id="4_5oayc"] [ext_resource type="Texture2D" uid="uid://taojrwr7xrp4" path="res://interface/upgrade_gold.png" id="4_i557v"] [ext_resource type="PackedScene" uid="uid://beg758fa6o0cs" path="res://value/evaluator.tscn" id="6_my6nv"] +[ext_resource type="PackedScene" uid="uid://du3005kwybbrh" path="res://entity/coin_gold/coin_gold.tscn" id="7_hh80i"] [ext_resource type="PackedScene" uid="uid://ratkps4plkhl" path="res://converters/copper_to_silver/copper_converter.tscn" id="7_ipeok"] [ext_resource type="PackedScene" uid="uid://but1bdslxp5jl" path="res://converters/silver_to_gold/silver_converter.tscn" id="8_0bbpi"] -[ext_resource type="PackedScene" uid="uid://bawprh8kluilq" path="res://entity/gem/gem.tscn" id="8_a3sk0"] [ext_resource type="PackedScene" uid="uid://c2rlx7egl7xiv" path="res://collector/universal_collector.tscn" id="9_7op48"] [ext_resource type="PackedScene" uid="uid://c5w3b55aiui6c" path="res://collector/collector.tscn" id="9_evdhb"] [ext_resource type="Theme" uid="uid://ba5utvfhnxa5i" path="res://interface/interface_theme.tres" id="10_sayqn"] [ext_resource type="Texture2D" uid="uid://c8pvjgtr2ufjl" path="res://interface/upgrade_copper.png" id="11_lt33g"] -[ext_resource type="PackedScene" uid="uid://qtk4tm6l367w" path="res://interface/ghost.tscn" id="16_8vhx6"] +[ext_resource type="PackedScene" path="res://interface/ghost.tscn" id="16_8vhx6"] +[ext_resource type="PackedScene" uid="uid://ddrhfhebwtq5" path="res://converters/item_converter/item_converter.tscn" id="17_fi36f"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_rh35r"] size = Vector2(240, 384) @@ -62,7 +63,7 @@ debug_color = Color(0, 0.6, 0.701961, 0) [node name="TimeSpawner" parent="." node_paths=PackedStringArray("target") instance=ExtResource("3_qwsty")] position = Vector2(136, 0) -scene = ExtResource("8_a3sk0") +scene = ExtResource("7_hh80i") target = NodePath("..") buffer_cap = 1 spawn_rect = Rect2(-20, 0, 40, 0) @@ -74,7 +75,7 @@ shape = SubResource("RectangleShape2D_4uksi") debug_color = Color(0, 0.6, 0.701961, 0) [node name="Timer" type="Timer" parent="TimeSpawner"] -wait_time = 0.1 +wait_time = 0.458 autostart = true [node name="ButtonSpawner" parent="." node_paths=PackedStringArray("target") instance=ExtResource("3_qwsty")] @@ -93,7 +94,7 @@ debug_color = Color(0, 0.6, 0.701961, 0) [node name="GravityFromGyro" parent="." instance=ExtResource("2_h2pfr")] [node name="CopperConverter" parent="." instance=ExtResource("7_ipeok")] -position = Vector2(62, 176) +position = Vector2(-81, 181) metadata/_edit_group_ = true [node name="Spawner" parent="CopperConverter" index="6" node_paths=PackedStringArray("target")] @@ -103,8 +104,9 @@ target = NodePath("../..") position = Vector2(0, 4.08333) [node name="SilverConverter" parent="." instance=ExtResource("8_0bbpi")] -position = Vector2(205, 337) +position = Vector2(-84, 312) rotation = -3.14159 +metadata/_edit_group_ = true [node name="Spawner" parent="SilverConverter" index="6" node_paths=PackedStringArray("target")] target = NodePath("../..") @@ -186,9 +188,17 @@ position = Vector2(405, 540) shape = SubResource("RectangleShape2D_jed57") debug_color = Color(0, 0, 0, 0.419608) +[node name="ItemConverter" parent="." instance=ExtResource("17_fi36f")] +position = Vector2(134, 191) +metadata/_edit_group_ = true + +[node name="Spawner" parent="ItemConverter" index="6" node_paths=PackedStringArray("target")] +target = NodePath("../..") + [connection signal="changed" from="Bottle/Evaluator" to="." method="_on_score_changed"] [connection signal="timeout" from="TimeSpawner/Timer" to="TimeSpawner" method="spawn"] [connection signal="collected" from="StoreCollector" to="." method="_on_store_collector_collected"] [editable path="CopperConverter"] [editable path="SilverConverter"] +[editable path="ItemConverter"] diff --git a/main.tscn b/main.tscn index 7a2dfb4..873f7b6 100644 --- a/main.tscn +++ b/main.tscn @@ -6,7 +6,7 @@ [ext_resource type="PackedScene" uid="uid://cklkdygv61bny" path="res://interface/shop_ui.tscn" id="2_qj86l"] [ext_resource type="Script" path="res://interface/custom_ui.gd" id="3_xav0n"] [ext_resource type="PackedScene" uid="uid://bo5unrhqpoyim" path="res://interface/game_ui.tscn" id="4_siim3"] -[ext_resource type="PackedScene" uid="uid://bpvx3nkkbluip" path="res://safe_ui.tscn" id="5_2uxda"] +[ext_resource type="PackedScene" path="res://safe_ui.tscn" id="5_2uxda"] [ext_resource type="Script" path="res://game_camera.gd" id="5_xxjtg"] [sub_resource type="GDScript" id="GDScript_kyj65"] diff --git a/spawner/spawner.tscn b/spawner/spawner.tscn index a671abf..50ad214 100644 --- a/spawner/spawner.tscn +++ b/spawner/spawner.tscn @@ -3,6 +3,4 @@ [ext_resource type="Script" path="res://spawner/spawner.gd" id="1_xqfmg"] [node name="Spawner" type="Area2D"] -collision_layer = 0 -collision_mask = 4 script = ExtResource("1_xqfmg") From e492e9ff43c8729d934f30e914c15f48d36a024d Mon Sep 17 00:00:00 2001 From: Matteo Balugani Date: Mon, 2 Oct 2023 17:10:23 +0200 Subject: [PATCH 3/5] converters fix --- converters/converter.gd | 6 +- ...gem_converter.tscn => gold_converter.tscn} | 58 +++++++++---------- converters/item_converter/item_converter.tscn | 1 - .../silver_to_gold/silver_converter.tscn | 2 - game/game.tscn | 18 ++++-- 5 files changed, 46 insertions(+), 39 deletions(-) rename converters/gold_to_gem/{gem_converter.tscn => gold_converter.tscn} (74%) diff --git a/converters/converter.gd b/converters/converter.gd index b098484..17386ef 100644 --- a/converters/converter.gd +++ b/converters/converter.gd @@ -16,14 +16,16 @@ func _on_collector_goal(): func _process(_delta): if coda>=1 and conversion_timer.is_stopped(): sprite_front.play() - sprite_back.play() + if not sprite_back==null: + sprite_back.play() conversion_timer.start() sound_working.play() func _on_timer_timeout(): coda-=1 sprite_front.stop() - sprite_back.stop() + if not sprite_back==null: + sprite_back.stop() sound_working.stop() sound_complete.play() spawner.spawn() diff --git a/converters/gold_to_gem/gem_converter.tscn b/converters/gold_to_gem/gold_converter.tscn similarity index 74% rename from converters/gold_to_gem/gem_converter.tscn rename to converters/gold_to_gem/gold_converter.tscn index c0059e5..d1d4152 100644 --- a/converters/gold_to_gem/gem_converter.tscn +++ b/converters/gold_to_gem/gold_converter.tscn @@ -1,36 +1,36 @@ -[gd_scene load_steps=23 format=3 uid="uid://c4ew8x4gch275"] +[gd_scene load_steps=23 format=3 uid="uid://cqshgmptdav2b"] -[ext_resource type="Script" path="res://converters/converter.gd" id="1_f5plk"] -[ext_resource type="Texture2D" uid="uid://chc8wqc1pclbk" path="res://converters/gold_to_gem/gold_converter_back.png" id="2_icys1"] -[ext_resource type="Texture2D" uid="uid://dgw5ip5qf5k7a" path="res://converters/gold_to_gem/gold_converter_front_1.png" id="3_n6auo"] -[ext_resource type="Texture2D" uid="uid://h7hu4paxjq84" path="res://converters/gold_to_gem/gold_converter_front_2.png" id="4_dxxyk"] -[ext_resource type="Texture2D" uid="uid://dlog0f5nk4b3c" path="res://converters/gold_to_gem/gold_converter_front_3.png" id="5_lnr8u"] -[ext_resource type="Texture2D" uid="uid://cj5m5k0hr3wmw" path="res://converters/gold_to_gem/gold_converter_front_4.png" id="6_nh41p"] -[ext_resource type="Texture2D" uid="uid://b5uershakuq20" path="res://converters/gold_to_gem/gold_converter_front_5.png" id="7_jfv3m"] -[ext_resource type="PackedScene" uid="uid://c5w3b55aiui6c" path="res://collector/collector.tscn" id="7_m34js"] -[ext_resource type="PackedScene" uid="uid://c67lfbk4gf1ga" path="res://spawner/spawner.tscn" id="8_qwbjp"] -[ext_resource type="PackedScene" uid="uid://bawprh8kluilq" path="res://entity/gem/gem.tscn" id="9_2ugi1"] -[ext_resource type="AudioStream" uid="uid://br25ip30mu174" path="res://audio/conversione/mechanic_sound.wav" id="10_f1h6i"] -[ext_resource type="AudioStream" uid="uid://7tw5efuo3gxj" path="res://audio/conversione/coin_to_coin.wav" id="11_ywwn2"] +[ext_resource type="Script" path="res://converters/converter.gd" id="1_fgju3"] +[ext_resource type="Texture2D" uid="uid://chc8wqc1pclbk" path="res://converters/gold_to_gem/gold_converter_back.png" id="2_hh4ft"] +[ext_resource type="Texture2D" uid="uid://dgw5ip5qf5k7a" path="res://converters/gold_to_gem/gold_converter_front_1.png" id="3_ofrsl"] +[ext_resource type="Texture2D" uid="uid://h7hu4paxjq84" path="res://converters/gold_to_gem/gold_converter_front_2.png" id="4_bfibv"] +[ext_resource type="Texture2D" uid="uid://dlog0f5nk4b3c" path="res://converters/gold_to_gem/gold_converter_front_3.png" id="5_grq6d"] +[ext_resource type="Texture2D" uid="uid://cj5m5k0hr3wmw" path="res://converters/gold_to_gem/gold_converter_front_4.png" id="6_m1sjp"] +[ext_resource type="Texture2D" uid="uid://b5uershakuq20" path="res://converters/gold_to_gem/gold_converter_front_5.png" id="7_ccs4f"] +[ext_resource type="PackedScene" uid="uid://c5w3b55aiui6c" path="res://collector/collector.tscn" id="8_77gmi"] +[ext_resource type="PackedScene" uid="uid://c67lfbk4gf1ga" path="res://spawner/spawner.tscn" id="9_ojqfv"] +[ext_resource type="PackedScene" uid="uid://bawprh8kluilq" path="res://entity/gem/gem.tscn" id="10_op7xt"] +[ext_resource type="AudioStream" uid="uid://br25ip30mu174" path="res://audio/conversione/mechanic_sound.wav" id="11_lofho"] +[ext_resource type="AudioStream" uid="uid://7tw5efuo3gxj" path="res://audio/conversione/coin_to_coin.wav" id="12_vklpo"] [sub_resource type="AtlasTexture" id="AtlasTexture_wy1v3"] -atlas = ExtResource("3_n6auo") +atlas = ExtResource("3_ofrsl") region = Rect2(0, 4, 32, 31) [sub_resource type="AtlasTexture" id="AtlasTexture_2164d"] -atlas = ExtResource("4_dxxyk") +atlas = ExtResource("4_bfibv") region = Rect2(0, 4, 32, 31) [sub_resource type="AtlasTexture" id="AtlasTexture_i5584"] -atlas = ExtResource("5_lnr8u") +atlas = ExtResource("5_grq6d") region = Rect2(0, 4, 32, 31) [sub_resource type="AtlasTexture" id="AtlasTexture_qad4c"] -atlas = ExtResource("6_nh41p") +atlas = ExtResource("6_m1sjp") region = Rect2(0, 4, 32, 31) [sub_resource type="AtlasTexture" id="AtlasTexture_600qi"] -atlas = ExtResource("7_jfv3m") +atlas = ExtResource("7_ccs4f") region = Rect2(0, 4, 32, 31) [sub_resource type="SpriteFrames" id="SpriteFrames_4m3dg"] @@ -53,7 +53,7 @@ animations = [{ }], "loop": true, "name": &"default", -"speed": 15.0 +"speed": 10.5 }] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_aslkt"] @@ -69,11 +69,10 @@ size = Vector2(26, 5) [sub_resource type="RectangleShape2D" id="RectangleShape2D_jeo5f"] size = Vector2(26, 8.83334) -[node name="GemConverter" type="StaticBody2D" node_paths=PackedStringArray("sprite_front", "conversion_timer", "sound_working", "sound_complete", "spawner")] -scale = Vector2(3, 3) +[node name="GoldConverter" type="StaticBody2D" node_paths=PackedStringArray("sprite_front", "conversion_timer", "sound_working", "sound_complete", "spawner")] collision_layer = 8 collision_mask = 0 -script = ExtResource("1_f5plk") +script = ExtResource("1_fgju3") sprite_front = NodePath("SpriteFront") conversion_timer = NodePath("ConversionTimer") sound_working = NodePath("SoundWorking") @@ -83,7 +82,7 @@ spawner = NodePath("Spawner") [node name="SpriteBack" type="Sprite2D" parent="."] z_index = -2 texture_filter = 1 -texture = ExtResource("2_icys1") +texture = ExtResource("2_hh4ft") [node name="SpriteFront" type="AnimatedSprite2D" parent="."] z_index = 2 @@ -108,7 +107,7 @@ position = Vector2(0, 4.5) rotation = 3.14159 shape = SubResource("RectangleShape2D_31dtl") -[node name="Collector" parent="." instance=ExtResource("7_m34js")] +[node name="Collector" parent="." instance=ExtResource("8_77gmi")] z_index = 2 collecting_types = Array[StringName]([&"Gold"]) collecting_amount = 10 @@ -117,9 +116,9 @@ collecting_amount = 10 shape = SubResource("RectangleShape2D_k11if") debug_color = Color(0, 0.701961, 0.188235, 0.419608) -[node name="Spawner" parent="." instance=ExtResource("8_qwbjp")] +[node name="Spawner" parent="." instance=ExtResource("9_ojqfv")] position = Vector2(0, 8) -scene = ExtResource("9_2ugi1") +scene = ExtResource("10_op7xt") buffer_cap = 1 spawn_rect = Rect2(-8, 0, 16, 4) spawn_rotation_degrees_min = 80.0 @@ -133,17 +132,16 @@ shape = SubResource("RectangleShape2D_jeo5f") debug_color = Color(0.701961, 0, 0, 0.419608) [node name="ConversionTimer" type="Timer" parent="."] -wait_time = 0.5 one_shot = true [node name="SoundAbsorb" type="AudioStreamPlayer" parent="."] -stream = ExtResource("10_f1h6i") +stream = ExtResource("11_lofho") [node name="SoundWorking" type="AudioStreamPlayer" parent="."] -stream = ExtResource("10_f1h6i") +stream = ExtResource("11_lofho") [node name="SoundComplete" type="AudioStreamPlayer" parent="."] -stream = ExtResource("11_ywwn2") +stream = ExtResource("12_vklpo") [connection signal="collected" from="Collector" to="." method="_on_collector_collected" flags=18] [connection signal="goal" from="Collector" to="." method="_on_collector_goal" flags=18] diff --git a/converters/item_converter/item_converter.tscn b/converters/item_converter/item_converter.tscn index b27c11d..6c7b1c5 100644 --- a/converters/item_converter/item_converter.tscn +++ b/converters/item_converter/item_converter.tscn @@ -180,7 +180,6 @@ shape = SubResource("RectangleShape2D_jeo5f") debug_color = Color(0.701961, 0, 0, 0.419608) [node name="ConversionTimer" type="Timer" parent="."] -wait_time = 0.5 one_shot = true [node name="SoundAbsorb" type="AudioStreamPlayer" parent="."] diff --git a/converters/silver_to_gold/silver_converter.tscn b/converters/silver_to_gold/silver_converter.tscn index a365724..3a33122 100644 --- a/converters/silver_to_gold/silver_converter.tscn +++ b/converters/silver_to_gold/silver_converter.tscn @@ -47,8 +47,6 @@ size = Vector2(26, 10) [node name="SilverConverter" type="StaticBody2D" node_paths=PackedStringArray("sprite_front", "conversion_timer", "sound_working", "sound_complete", "spawner")] scale = Vector2(3, 3) -collision_layer = 8 -collision_mask = 0 script = ExtResource("1_chhfg") sprite_front = NodePath("SpriteFront") conversion_timer = NodePath("ConversionTimer") diff --git a/game/game.tscn b/game/game.tscn index 4699ae6..4d7c747 100644 --- a/game/game.tscn +++ b/game/game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=23 format=3 uid="uid://c3rxmcwa5nqng"] +[gd_scene load_steps=24 format=3 uid="uid://c3rxmcwa5nqng"] [ext_resource type="Script" path="res://game/game.gd" id="1_i3ly0"] [ext_resource type="PackedScene" uid="uid://bllsprv8orpn4" path="res://bottle/bottle.tscn" id="1_y7o2l"] @@ -17,6 +17,7 @@ [ext_resource type="Texture2D" uid="uid://c8pvjgtr2ufjl" path="res://interface/upgrade_copper.png" id="11_lt33g"] [ext_resource type="PackedScene" path="res://interface/ghost.tscn" id="16_8vhx6"] [ext_resource type="PackedScene" uid="uid://ddrhfhebwtq5" path="res://converters/item_converter/item_converter.tscn" id="17_fi36f"] +[ext_resource type="PackedScene" uid="uid://cqshgmptdav2b" path="res://converters/gold_to_gem/gold_converter.tscn" id="17_lmxhp"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_rh35r"] size = Vector2(240, 384) @@ -94,7 +95,7 @@ debug_color = Color(0, 0.6, 0.701961, 0) [node name="GravityFromGyro" parent="." instance=ExtResource("2_h2pfr")] [node name="CopperConverter" parent="." instance=ExtResource("7_ipeok")] -position = Vector2(-81, 181) +position = Vector2(-83, 227) metadata/_edit_group_ = true [node name="Spawner" parent="CopperConverter" index="6" node_paths=PackedStringArray("target")] @@ -104,7 +105,7 @@ target = NodePath("../..") position = Vector2(0, 4.08333) [node name="SilverConverter" parent="." instance=ExtResource("8_0bbpi")] -position = Vector2(-84, 312) +position = Vector2(354, 361) rotation = -3.14159 metadata/_edit_group_ = true @@ -188,8 +189,16 @@ position = Vector2(405, 540) shape = SubResource("RectangleShape2D_jed57") debug_color = Color(0, 0, 0, 0.419608) +[node name="GoldConverter" parent="." instance=ExtResource("17_lmxhp")] +position = Vector2(135, 182) +scale = Vector2(3, 3) +metadata/_edit_group_ = true + +[node name="Spawner" parent="GoldConverter" index="6" node_paths=PackedStringArray("target")] +target = NodePath("../..") + [node name="ItemConverter" parent="." instance=ExtResource("17_fi36f")] -position = Vector2(134, 191) +position = Vector2(365, 196) metadata/_edit_group_ = true [node name="Spawner" parent="ItemConverter" index="6" node_paths=PackedStringArray("target")] @@ -201,4 +210,5 @@ target = NodePath("../..") [editable path="CopperConverter"] [editable path="SilverConverter"] +[editable path="GoldConverter"] [editable path="ItemConverter"] From 8b969aafb072445554f91c08fd0d6dcd25996a9b Mon Sep 17 00:00:00 2001 From: Matteo Balugani Date: Mon, 2 Oct 2023 17:32:18 +0200 Subject: [PATCH 4/5] ? --- converters/item_converter/item_converter.tscn | 2 +- entity/gem/gem.tscn | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/converters/item_converter/item_converter.tscn b/converters/item_converter/item_converter.tscn index 6c7b1c5..f2f1bf9 100644 --- a/converters/item_converter/item_converter.tscn +++ b/converters/item_converter/item_converter.tscn @@ -156,7 +156,7 @@ shape = SubResource("RectangleShape2D_31dtl") [node name="Collector" parent="." node_paths=PackedStringArray("sound_absorb") instance=ExtResource("3_qehi7")] z_index = 2 -collecting_types = Array[StringName]([&"Gold"]) +collecting_types = Array[StringName]([&"Gold", &"Gem"]) sound_absorb = NodePath("../SoundAbsorb") collecting_amount = 10 diff --git a/entity/gem/gem.tscn b/entity/gem/gem.tscn index bfa6cf6..ec92543 100644 --- a/entity/gem/gem.tscn +++ b/entity/gem/gem.tscn @@ -35,7 +35,7 @@ texture = ExtResource("3_6jejy") shader = ExtResource("5_v6ppl") [node name="Collectible" parent="." instance=ExtResource("4_idoeu")] -type = &"Silver" +type = &"Gem" [node name="Valuable" parent="." instance=ExtResource("5_7bd6c")] value = 10 From 30c29a7ade7c682788382f64560e3ce691c73c6a Mon Sep 17 00:00:00 2001 From: Matteo Balugani Date: Mon, 2 Oct 2023 17:41:07 +0200 Subject: [PATCH 5/5] fixed coin copper error (script eliminato) --- entity/coin_copper/coin_copper.tscn | 4 +-- game/game.tscn | 44 ++++++----------------------- 2 files changed, 10 insertions(+), 38 deletions(-) diff --git a/entity/coin_copper/coin_copper.tscn b/entity/coin_copper/coin_copper.tscn index 750fd34..33dd1fa 100644 --- a/entity/coin_copper/coin_copper.tscn +++ b/entity/coin_copper/coin_copper.tscn @@ -1,7 +1,6 @@ -[gd_scene load_steps=9 format=3 uid="uid://c3kitncwpi42j"] +[gd_scene load_steps=8 format=3 uid="uid://c3kitncwpi42j"] [ext_resource type="PhysicsMaterial" uid="uid://c6kn1an85lccr" path="res://entity/coin_physics_material.tres" id="1_1fypc"] -[ext_resource type="Script" path="res://entity/coin_copper/coin_copper.gd" id="2_1r8w3"] [ext_resource type="Texture2D" uid="uid://dbdkb4vt7dh85" path="res://entity/coin_copper/coin_copper_4.png" id="2_4pvkj"] [ext_resource type="Texture2D" uid="uid://2vtvoj6ua3cb" path="res://entity/coin_copper/coin_copper_outline_2.png" id="3_dq1f7"] [ext_resource type="PackedScene" uid="uid://bk1vvq5rug01m" path="res://collector/collectible.tscn" id="4_npwn2"] @@ -21,7 +20,6 @@ max_contacts_reported = 1 contact_monitor = true linear_damp = 0.1 angular_damp = 0.1 -script = ExtResource("2_1r8w3") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] scale = Vector2(2, 2) diff --git a/game/game.tscn b/game/game.tscn index 4d7c747..06336bb 100644 --- a/game/game.tscn +++ b/game/game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=24 format=3 uid="uid://c3rxmcwa5nqng"] +[gd_scene load_steps=23 format=3 uid="uid://c3rxmcwa5nqng"] [ext_resource type="Script" path="res://game/game.gd" id="1_i3ly0"] [ext_resource type="PackedScene" uid="uid://bllsprv8orpn4" path="res://bottle/bottle.tscn" id="1_y7o2l"] @@ -8,16 +8,15 @@ [ext_resource type="PackedScene" uid="uid://c3kitncwpi42j" path="res://entity/coin_copper/coin_copper.tscn" id="4_5oayc"] [ext_resource type="Texture2D" uid="uid://taojrwr7xrp4" path="res://interface/upgrade_gold.png" id="4_i557v"] [ext_resource type="PackedScene" uid="uid://beg758fa6o0cs" path="res://value/evaluator.tscn" id="6_my6nv"] -[ext_resource type="PackedScene" uid="uid://du3005kwybbrh" path="res://entity/coin_gold/coin_gold.tscn" id="7_hh80i"] [ext_resource type="PackedScene" uid="uid://ratkps4plkhl" path="res://converters/copper_to_silver/copper_converter.tscn" id="7_ipeok"] +[ext_resource type="PackedScene" uid="uid://4d0al27t7axe" path="res://bottle/placeable_area.tscn" id="7_muqgj"] [ext_resource type="PackedScene" uid="uid://but1bdslxp5jl" path="res://converters/silver_to_gold/silver_converter.tscn" id="8_0bbpi"] +[ext_resource type="PackedScene" uid="uid://bawprh8kluilq" path="res://entity/gem/gem.tscn" id="8_a3sk0"] [ext_resource type="PackedScene" uid="uid://c2rlx7egl7xiv" path="res://collector/universal_collector.tscn" id="9_7op48"] [ext_resource type="PackedScene" uid="uid://c5w3b55aiui6c" path="res://collector/collector.tscn" id="9_evdhb"] [ext_resource type="Theme" uid="uid://ba5utvfhnxa5i" path="res://interface/interface_theme.tres" id="10_sayqn"] [ext_resource type="Texture2D" uid="uid://c8pvjgtr2ufjl" path="res://interface/upgrade_copper.png" id="11_lt33g"] -[ext_resource type="PackedScene" path="res://interface/ghost.tscn" id="16_8vhx6"] -[ext_resource type="PackedScene" uid="uid://ddrhfhebwtq5" path="res://converters/item_converter/item_converter.tscn" id="17_fi36f"] -[ext_resource type="PackedScene" uid="uid://cqshgmptdav2b" path="res://converters/gold_to_gem/gold_converter.tscn" id="17_lmxhp"] +[ext_resource type="PackedScene" uid="uid://qtk4tm6l367w" path="res://interface/ghost.tscn" id="16_8vhx6"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_rh35r"] size = Vector2(240, 384) @@ -46,14 +45,7 @@ position = Vector2(90, 306) [node name="Bottle" parent="." instance=ExtResource("1_y7o2l")] -[node name="PlaceableArea" type="Area2D" parent="Bottle"] -position = Vector2(136, 272) -collision_layer = 16 -collision_mask = 0 - -[node name="BottleShape" type="CollisionShape2D" parent="Bottle/PlaceableArea"] -shape = SubResource("RectangleShape2D_rh35r") -debug_color = Color(0, 0.6, 0.701961, 0) +[node name="PlaceableArea" parent="Bottle" instance=ExtResource("7_muqgj")] [node name="Evaluator" parent="Bottle" instance=ExtResource("6_my6nv")] position = Vector2(136, 272) @@ -64,7 +56,7 @@ debug_color = Color(0, 0.6, 0.701961, 0) [node name="TimeSpawner" parent="." node_paths=PackedStringArray("target") instance=ExtResource("3_qwsty")] position = Vector2(136, 0) -scene = ExtResource("7_hh80i") +scene = ExtResource("8_a3sk0") target = NodePath("..") buffer_cap = 1 spawn_rect = Rect2(-20, 0, 40, 0) @@ -76,7 +68,7 @@ shape = SubResource("RectangleShape2D_4uksi") debug_color = Color(0, 0.6, 0.701961, 0) [node name="Timer" type="Timer" parent="TimeSpawner"] -wait_time = 0.458 +wait_time = 0.1 autostart = true [node name="ButtonSpawner" parent="." node_paths=PackedStringArray("target") instance=ExtResource("3_qwsty")] @@ -95,7 +87,7 @@ debug_color = Color(0, 0.6, 0.701961, 0) [node name="GravityFromGyro" parent="." instance=ExtResource("2_h2pfr")] [node name="CopperConverter" parent="." instance=ExtResource("7_ipeok")] -position = Vector2(-83, 227) +position = Vector2(62, 176) metadata/_edit_group_ = true [node name="Spawner" parent="CopperConverter" index="6" node_paths=PackedStringArray("target")] @@ -105,9 +97,8 @@ target = NodePath("../..") position = Vector2(0, 4.08333) [node name="SilverConverter" parent="." instance=ExtResource("8_0bbpi")] -position = Vector2(354, 361) +position = Vector2(205, 337) rotation = -3.14159 -metadata/_edit_group_ = true [node name="Spawner" parent="SilverConverter" index="6" node_paths=PackedStringArray("target")] target = NodePath("../..") @@ -189,26 +180,9 @@ position = Vector2(405, 540) shape = SubResource("RectangleShape2D_jed57") debug_color = Color(0, 0, 0, 0.419608) -[node name="GoldConverter" parent="." instance=ExtResource("17_lmxhp")] -position = Vector2(135, 182) -scale = Vector2(3, 3) -metadata/_edit_group_ = true - -[node name="Spawner" parent="GoldConverter" index="6" node_paths=PackedStringArray("target")] -target = NodePath("../..") - -[node name="ItemConverter" parent="." instance=ExtResource("17_fi36f")] -position = Vector2(365, 196) -metadata/_edit_group_ = true - -[node name="Spawner" parent="ItemConverter" index="6" node_paths=PackedStringArray("target")] -target = NodePath("../..") - [connection signal="changed" from="Bottle/Evaluator" to="." method="_on_score_changed"] [connection signal="timeout" from="TimeSpawner/Timer" to="TimeSpawner" method="spawn"] [connection signal="collected" from="StoreCollector" to="." method="_on_store_collector_collected"] [editable path="CopperConverter"] [editable path="SilverConverter"] -[editable path="GoldConverter"] -[editable path="ItemConverter"]