1
Fork 0
mirror of https://github.com/Steffo99/swear-jar.git synced 2024-11-21 23:34:18 +00:00

Improve converterss

This commit is contained in:
Steffo 2023-10-14 02:59:38 +02:00
parent 2b3827ed51
commit d77032c967
Signed by: steffo
GPG key ID: 2A24051445686895
7 changed files with 148 additions and 129 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=22 format=3 uid="uid://ratkps4plkhl"] [gd_scene load_steps=24 format=3 uid="uid://ratkps4plkhl"]
[ext_resource type="Script" path="res://converters/converter.gd" id="1_mas6k"] [ext_resource type="Script" path="res://converters/converter.gd" id="1_mas6k"]
[ext_resource type="PackedScene" uid="uid://dme22vvfgme5f" path="res://entity/coin_silver/coin_silver.tscn" id="2_h5aul"] [ext_resource type="PackedScene" uid="uid://dme22vvfgme5f" path="res://entity/coin_silver/coin_silver.tscn" id="2_h5aul"]
@ -8,8 +8,10 @@
[ext_resource type="Texture2D" uid="uid://dg4qq1pgojk8d" path="res://converters/copper_to_silver/copper_converter_front_3.png" id="6_acinx"] [ext_resource type="Texture2D" uid="uid://dg4qq1pgojk8d" path="res://converters/copper_to_silver/copper_converter_front_3.png" id="6_acinx"]
[ext_resource type="Texture2D" uid="uid://60502lbpup6" path="res://converters/copper_to_silver/copper_converter_front_4.png" id="7_11jge"] [ext_resource type="Texture2D" uid="uid://60502lbpup6" path="res://converters/copper_to_silver/copper_converter_front_4.png" id="7_11jge"]
[ext_resource type="PackedScene" uid="uid://c5w3b55aiui6c" path="res://collector/collector.tscn" id="8_tc2oo"] [ext_resource type="PackedScene" uid="uid://c5w3b55aiui6c" path="res://collector/collector.tscn" id="8_tc2oo"]
[ext_resource type="AudioStream" uid="uid://bpxjhl0aq3yrv" path="res://audio/conversione/suck2.wav" id="9_1aocf"]
[ext_resource type="PackedScene" uid="uid://c67lfbk4gf1ga" path="res://spawner/spawner.tscn" id="9_2wvgu"] [ext_resource type="PackedScene" uid="uid://c67lfbk4gf1ga" path="res://spawner/spawner.tscn" id="9_2wvgu"]
[ext_resource type="AudioStream" uid="uid://br25ip30mu174" path="res://audio/conversione/mechanic_sound.wav" id="10_6hhch"] [ext_resource type="AudioStream" uid="uid://br25ip30mu174" path="res://audio/conversione/mechanic_sound.wav" id="10_6hhch"]
[ext_resource type="PackedScene" uid="uid://b3ev0md0jrpfj" path="res://converters/working_timer.tscn" id="10_72f5c"]
[ext_resource type="AudioStream" uid="uid://7tw5efuo3gxj" path="res://audio/conversione/coin_to_coin.wav" id="11_r8505"] [ext_resource type="AudioStream" uid="uid://7tw5efuo3gxj" path="res://audio/conversione/coin_to_coin.wav" id="11_r8505"]
[ext_resource type="PackedScene" uid="uid://bevj27e1ha8m3" path="res://converters/placement_obstruction.tscn" id="12_5qhgs"] [ext_resource type="PackedScene" uid="uid://bevj27e1ha8m3" path="res://converters/placement_obstruction.tscn" id="12_5qhgs"]
@ -49,29 +51,25 @@ animations = [{
"speed": 15.0 "speed": 15.0
}] }]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_aslkt"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bp8ms"]
radius = 1.5 radius = 1.5
height = 28.0 height = 28.0
[sub_resource type="RectangleShape2D" id="RectangleShape2D_31dtl"] [sub_resource type="ConvexPolygonShape2D" id="ConvexPolygonShape2D_ediwe"]
size = Vector2(26, 4) points = PackedVector2Array(0, 0, -16, 0, -16, -3, -5, -7, 5, -7, 16, -3, 16, 0)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_k11if"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_csk2d"]
size = Vector2(26, 5) size = Vector2(26, 5)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jeo5f"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_kbgq6"]
size = Vector2(26, 10) size = Vector2(16, 4)
[node name="CopperConverter" type="StaticBody2D" node_paths=PackedStringArray("sprite_front", "conversion_timer", "sound_working", "sound_complete", "spawner")] [node name="CopperConverter" type="StaticBody2D" node_paths=PackedStringArray("spawner")]
scale = Vector2(3, 3) scale = Vector2(3, 3)
collision_layer = 8 collision_layer = 8
collision_mask = 0 collision_mask = 0
input_pickable = true input_pickable = true
script = ExtResource("1_mas6k") script = ExtResource("1_mas6k")
sprite_front = NodePath("SpriteFront")
conversion_timer = NodePath("ConversionTimer")
sound_working = NodePath("SoundWorking")
sound_complete = NodePath("Spawner/SoundComplete")
spawner = NodePath("Spawner") spawner = NodePath("Spawner")
[node name="SpriteBack" type="Sprite2D" parent="."] [node name="SpriteBack" type="Sprite2D" parent="."]
@ -84,35 +82,54 @@ z_index = 2
texture_filter = 1 texture_filter = 1
sprite_frames = SubResource("SpriteFrames_4m3dg") sprite_frames = SubResource("SpriteFrames_4m3dg")
[node name="PlacementObstruction" parent="." instance=ExtResource("12_5qhgs")]
[node name="LeftWall" type="CollisionShape2D" parent="."] [node name="LeftWall" type="CollisionShape2D" parent="."]
z_index = 2 z_index = 2
position = Vector2(-14.5, -3) position = Vector2(-14.5, -3)
shape = SubResource("CapsuleShape2D_aslkt") shape = SubResource("CapsuleShape2D_bp8ms")
debug_color = Color(0, 0.6, 0.701961, 0.419608) debug_color = Color(0, 0, 0, 0.784314)
[node name="RightWall" type="CollisionShape2D" parent="."] [node name="RightWall" type="CollisionShape2D" parent="."]
z_index = 2 z_index = 2
position = Vector2(14.5, -3) position = Vector2(14.5, -3)
shape = SubResource("CapsuleShape2D_aslkt") shape = SubResource("CapsuleShape2D_bp8ms")
debug_color = Color(0, 0, 0, 0.784314)
[node name="InnerWall" type="CollisionShape2D" parent="."] [node name="BottomWall" type="CollisionShape2D" parent="."]
z_index = 3 z_index = 3
position = Vector2(0, 4.5) position = Vector2(1.16196e-05, 9.08333)
rotation = 3.14159 rotation = 3.14159
shape = SubResource("RectangleShape2D_31dtl") shape = SubResource("ConvexPolygonShape2D_ediwe")
one_way_collision = true one_way_collision = true
debug_color = Color(0, 0, 0, 0.784314)
[node name="Collector" parent="." instance=ExtResource("8_tc2oo")] [node name="Collector" parent="." node_paths=PackedStringArray("sound_absorb") instance=ExtResource("8_tc2oo")]
z_index = 2 z_index = 2
position = Vector2(0, 6.5)
collecting_types = Array[StringName]([&"Copper"]) collecting_types = Array[StringName]([&"Copper"])
sound_absorb = NodePath("SoundAbsorb")
collecting_amount = 10 collecting_amount = 10
[node name="CollectShape" type="CollisionShape2D" parent="Collector"] [node name="CollectShape" type="CollisionShape2D" parent="Collector"]
shape = SubResource("RectangleShape2D_k11if") shape = SubResource("RectangleShape2D_csk2d")
debug_color = Color(0, 0.701961, 0.188235, 0.419608) debug_color = Color(0, 0.701961, 0.188235, 0.419608)
[node name="SoundAbsorb" type="AudioStreamPlayer2D" parent="Collector"]
stream = ExtResource("9_1aocf")
volume_db = -8.0
pitch_scale = 2.0
[node name="WorkingTimer" parent="." node_paths=PackedStringArray("working_sound") instance=ExtResource("10_72f5c")]
working_sound = NodePath("SoundWorking")
[node name="SoundWorking" type="AudioStreamPlayer2D" parent="WorkingTimer"]
position = Vector2(0, 25)
stream = ExtResource("10_6hhch")
pitch_scale = 1.08
[node name="Spawner" parent="." node_paths=PackedStringArray("sound_complete") instance=ExtResource("9_2wvgu")] [node name="Spawner" parent="." node_paths=PackedStringArray("sound_complete") instance=ExtResource("9_2wvgu")]
position = Vector2(0, 8) position = Vector2(0, 10)
scene = ExtResource("2_h5aul") scene = ExtResource("2_h5aul")
buffer_cap = 1 buffer_cap = 1
spawn_rect = Rect2(-8, 0, 16, 4) spawn_rect = Rect2(-8, 0, 16, 4)
@ -123,23 +140,14 @@ sound_complete = NodePath("SoundComplete")
[node name="PreventSpawnShape" type="CollisionShape2D" parent="Spawner"] [node name="PreventSpawnShape" type="CollisionShape2D" parent="Spawner"]
z_index = 3 z_index = 3
position = Vector2(0, 3.5) position = Vector2(0, 2)
shape = SubResource("RectangleShape2D_jeo5f") shape = SubResource("RectangleShape2D_kbgq6")
debug_color = Color(0.701961, 0, 0, 0.419608) debug_color = Color(0.701961, 0, 0, 0.419608)
[node name="SoundComplete" type="AudioStreamPlayer" parent="Spawner"] [node name="SoundComplete" type="AudioStreamPlayer2D" parent="Spawner"]
position = Vector2(0, 2)
stream = ExtResource("11_r8505") stream = ExtResource("11_r8505")
max_polyphony = 4
[node name="ConversionTimer" type="Timer" parent="."]
wait_time = 0.5
one_shot = true
[node name="SoundWorking" type="AudioStreamPlayer" parent="."]
stream = ExtResource("10_6hhch")
[node name="ConverterPlacementBody" parent="." instance=ExtResource("12_5qhgs")]
[connection signal="input_event" from="." to="." method="_on_input_event"] [connection signal="input_event" from="." to="." method="_on_input_event"]
[connection signal="goal" from="Collector" to="." method="_on_collector_goal"] [connection signal="goal" from="Collector" to="." method="_on_collector_goal"]
[connection signal="timeout" from="ConversionTimer" to="." method="_on_timer_timeout"] [connection signal="timeout" from="WorkingTimer" to="." method="_on_working_timer_timeout"]

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=27 format=3 uid="uid://clanhkk4sg47w"] [gd_scene load_steps=28 format=3 uid="uid://clanhkk4sg47w"]
[ext_resource type="Script" path="res://converters/converter.gd" id="1_mf1ls"] [ext_resource type="Script" path="res://converters/converter.gd" id="1_mf1ls"]
[ext_resource type="Texture2D" uid="uid://2dhqp2liete7" path="res://converters/gold_to_coaldiamond/diamond_converter_back.png" id="2_nj8gd"] [ext_resource type="Texture2D" uid="uid://2dhqp2liete7" path="res://converters/gold_to_coaldiamond/diamond_converter_back.png" id="2_nj8gd"]
@ -10,12 +10,13 @@
[ext_resource type="Texture2D" uid="uid://b3vbqgitwo8la" path="res://converters/gold_to_coaldiamond/diamond_converter_front_5.png" id="7_swl1g"] [ext_resource type="Texture2D" uid="uid://b3vbqgitwo8la" path="res://converters/gold_to_coaldiamond/diamond_converter_front_5.png" id="7_swl1g"]
[ext_resource type="PackedScene" uid="uid://c67lfbk4gf1ga" path="res://spawner/spawner.tscn" id="8_yel0k"] [ext_resource type="PackedScene" uid="uid://c67lfbk4gf1ga" path="res://spawner/spawner.tscn" id="8_yel0k"]
[ext_resource type="AudioStream" uid="uid://br25ip30mu174" path="res://audio/conversione/mechanic_sound.wav" id="10_hy4ck"] [ext_resource type="AudioStream" uid="uid://br25ip30mu174" path="res://audio/conversione/mechanic_sound.wav" id="10_hy4ck"]
[ext_resource type="AudioStream" uid="uid://bpxjhl0aq3yrv" path="res://audio/conversione/suck2.wav" id="10_p3n1d"]
[ext_resource type="PackedScene" uid="uid://diy8fj7mcc00p" path="res://entity/coal_diamond/coal.tscn" id="10_ry7ak"] [ext_resource type="PackedScene" uid="uid://diy8fj7mcc00p" path="res://entity/coal_diamond/coal.tscn" id="10_ry7ak"]
[ext_resource type="AudioStream" uid="uid://db1i6rqitk0e" path="res://audio/conversione/coal_funny.wav" id="11_601lg"] [ext_resource type="AudioStream" uid="uid://db1i6rqitk0e" path="res://audio/conversione/coal_funny.wav" id="11_601lg"]
[ext_resource type="PackedScene" uid="uid://cr5tiep20hk0s" path="res://entity/coal_diamond/diamond.tscn" id="11_ekhmr"] [ext_resource type="PackedScene" uid="uid://cr5tiep20hk0s" path="res://entity/coal_diamond/diamond.tscn" id="11_ekhmr"]
[ext_resource type="PackedScene" uid="uid://b3ev0md0jrpfj" path="res://converters/working_timer.tscn" id="11_svms0"]
[ext_resource type="AudioStream" uid="uid://cc4mqxq6mxmdg" path="res://audio/conversione/coin_to_gem.wav" id="12_pddsd"] [ext_resource type="AudioStream" uid="uid://cc4mqxq6mxmdg" path="res://audio/conversione/coin_to_gem.wav" id="12_pddsd"]
[ext_resource type="PackedScene" uid="uid://bevj27e1ha8m3" path="res://converters/placement_obstruction.tscn" id="12_xld3l"] [ext_resource type="PackedScene" uid="uid://bevj27e1ha8m3" path="res://converters/placement_obstruction.tscn" id="12_xld3l"]
[ext_resource type="AudioStream" uid="uid://du16ilpv6gmxd" path="res://audio/conversione/drop_in_lava.wav" id="13_jvouj"]
[sub_resource type="AtlasTexture" id="AtlasTexture_00uxa"] [sub_resource type="AtlasTexture" id="AtlasTexture_00uxa"]
atlas = ExtResource("3_p4wsd") atlas = ExtResource("3_p4wsd")
@ -60,31 +61,27 @@ animations = [{
"speed": 10.0 "speed": 10.0
}] }]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_aslkt"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_480vn"]
radius = 1.5 radius = 1.5
height = 28.0 height = 28.0
[sub_resource type="RectangleShape2D" id="RectangleShape2D_31dtl"] [sub_resource type="ConvexPolygonShape2D" id="ConvexPolygonShape2D_o0ajo"]
size = Vector2(26, 4) points = PackedVector2Array(0, 0, -16, 0, -16, -3, -5, -7, 5, -7, 16, -3, 16, 0)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_k11if"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_apl80"]
size = Vector2(26, 5) size = Vector2(26, 5)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jeo5f"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_vi6vj"]
size = Vector2(26, 10) size = Vector2(16, 4)
[node name="CoalDiamondConverter" type="StaticBody2D" node_paths=PackedStringArray("sprite_front", "conversion_timer", "sound_working", "sound_complete", "spawner", "spawner_alt")] [node name="CoalDiamondConverter" type="StaticBody2D" node_paths=PackedStringArray("spawner", "spawner_alt")]
scale = Vector2(3, 3) scale = Vector2(3, 3)
collision_layer = 8 collision_layer = 8
collision_mask = 0 collision_mask = 0
input_pickable = true input_pickable = true
script = ExtResource("1_mf1ls") script = ExtResource("1_mf1ls")
sprite_front = NodePath("SpriteFront")
conversion_timer = NodePath("ConversionTimer")
sound_working = NodePath("SoundWorking")
sound_complete = NodePath("SpawnerAlt/SoundComplete")
spawner = NodePath("Spawner") spawner = NodePath("Spawner")
spawner_alt = NodePath("SpawnerAlt") spawner_alt = NodePath("Spawner2")
spawner_alt_chance = 0.12 spawner_alt_chance = 0.12
[node name="SpriteBack" type="Sprite2D" parent="."] [node name="SpriteBack" type="Sprite2D" parent="."]
@ -98,35 +95,56 @@ texture_filter = 1
sprite_frames = SubResource("SpriteFrames_4m3dg") sprite_frames = SubResource("SpriteFrames_4m3dg")
frame_progress = 0.944486 frame_progress = 0.944486
[node name="PlacementObstruction" parent="." instance=ExtResource("12_xld3l")]
[node name="LeftWall" type="CollisionShape2D" parent="."] [node name="LeftWall" type="CollisionShape2D" parent="."]
z_index = 2 z_index = 2
position = Vector2(-14.5, -3) position = Vector2(-14.5, -3)
shape = SubResource("CapsuleShape2D_aslkt") shape = SubResource("CapsuleShape2D_480vn")
debug_color = Color(0, 0, 0, 0.784314)
[node name="RightWall" type="CollisionShape2D" parent="."] [node name="RightWall" type="CollisionShape2D" parent="."]
z_index = 2 z_index = 2
position = Vector2(14.5, -3) position = Vector2(14.5, -3)
shape = SubResource("CapsuleShape2D_aslkt") shape = SubResource("CapsuleShape2D_480vn")
debug_color = Color(0, 0, 0, 0.784314)
[node name="InnerWall" type="CollisionShape2D" parent="."] [node name="BottomWall" type="CollisionShape2D" parent="."]
z_index = 3 z_index = 3
position = Vector2(0, 4.5) position = Vector2(1.16196e-05, 9.08333)
rotation = 3.14159 rotation = 3.14159
shape = SubResource("RectangleShape2D_31dtl") shape = SubResource("ConvexPolygonShape2D_o0ajo")
one_way_collision = true one_way_collision = true
debug_color = Color(0, 0, 0, 0.784314)
[node name="Collector" parent="." instance=ExtResource("7_rxm8j")] [node name="Collector" parent="." node_paths=PackedStringArray("sound_absorb") instance=ExtResource("7_rxm8j")]
z_index = 2 z_index = 2
position = Vector2(0, 6.5)
collecting_types = Array[StringName]([&"Gold"]) collecting_types = Array[StringName]([&"Gold"])
sound_absorb = NodePath("SoundAbsorb")
collecting_amount = 10 collecting_amount = 10
[node name="CollectShape" type="CollisionShape2D" parent="Collector"] [node name="CollectShape" type="CollisionShape2D" parent="Collector"]
shape = SubResource("RectangleShape2D_k11if") shape = SubResource("RectangleShape2D_apl80")
debug_color = Color(0, 0.701961, 0.188235, 0.419608) debug_color = Color(0, 0.701961, 0.188235, 0.419608)
[node name="Spawner" parent="." node_paths=PackedStringArray("sound_complete") instance=ExtResource("8_yel0k")] [node name="SoundAbsorb" type="AudioStreamPlayer2D" parent="Collector"]
position = Vector2(0, 8) stream = ExtResource("10_p3n1d")
volume_db = -8.0
pitch_scale = 2.0
[node name="WorkingTimer" parent="." node_paths=PackedStringArray("working_sound") instance=ExtResource("11_svms0")]
working_sound = NodePath("SoundWorking")
[node name="SoundWorking" type="AudioStreamPlayer2D" parent="WorkingTimer"]
position = Vector2(0, 25)
stream = ExtResource("10_hy4ck")
pitch_scale = 1.08
[node name="Spawner" parent="." node_paths=PackedStringArray("target", "sound_complete") instance=ExtResource("8_yel0k")]
position = Vector2(0, 10)
scene = ExtResource("10_ry7ak") scene = ExtResource("10_ry7ak")
target = NodePath("")
buffer_cap = 1 buffer_cap = 1
spawn_rect = Rect2(-8, 0, 16, 4) spawn_rect = Rect2(-8, 0, 16, 4)
spawn_rotation_degrees_min = 80.0 spawn_rotation_degrees_min = 80.0
@ -136,17 +154,18 @@ sound_complete = NodePath("SoundComplete")
[node name="PreventSpawnShape" type="CollisionShape2D" parent="Spawner"] [node name="PreventSpawnShape" type="CollisionShape2D" parent="Spawner"]
z_index = 3 z_index = 3
position = Vector2(0, 3.5) position = Vector2(0, 2)
shape = SubResource("RectangleShape2D_jeo5f") shape = SubResource("RectangleShape2D_vi6vj")
debug_color = Color(0.701961, 0, 0, 0.419608) debug_color = Color(0.701961, 0, 0, 0.419608)
[node name="SoundComplete" type="AudioStreamPlayer" parent="Spawner"] [node name="SoundComplete" type="AudioStreamPlayer2D" parent="Spawner"]
position = Vector2(0, 2)
stream = ExtResource("11_601lg") stream = ExtResource("11_601lg")
volume_db = -10.011
[node name="SpawnerAlt" parent="." node_paths=PackedStringArray("sound_complete") instance=ExtResource("8_yel0k")] [node name="Spawner2" parent="." node_paths=PackedStringArray("target", "sound_complete") instance=ExtResource("8_yel0k")]
position = Vector2(0, 8) position = Vector2(0, 10)
scene = ExtResource("11_ekhmr") scene = ExtResource("11_ekhmr")
target = NodePath("")
buffer_cap = 1 buffer_cap = 1
spawn_rect = Rect2(-8, 0, 16, 4) spawn_rect = Rect2(-8, 0, 16, 4)
spawn_rotation_degrees_min = 80.0 spawn_rotation_degrees_min = 80.0
@ -154,29 +173,16 @@ spawn_rotation_degrees_max = 100.0
overlapping_body_count_limit = 4 overlapping_body_count_limit = 4
sound_complete = NodePath("SoundComplete") sound_complete = NodePath("SoundComplete")
[node name="PreventSpawnShape" type="CollisionShape2D" parent="SpawnerAlt"] [node name="PreventSpawnShape" type="CollisionShape2D" parent="Spawner2"]
z_index = 3 z_index = 3
position = Vector2(0, 3.5) position = Vector2(0, 2)
shape = SubResource("RectangleShape2D_jeo5f") shape = SubResource("RectangleShape2D_vi6vj")
debug_color = Color(0.701961, 0, 0, 0.419608) debug_color = Color(0.701961, 0, 0, 0.419608)
[node name="SoundComplete" type="AudioStreamPlayer" parent="SpawnerAlt"] [node name="SoundComplete" type="AudioStreamPlayer2D" parent="Spawner2"]
position = Vector2(0, 2)
stream = ExtResource("12_pddsd") stream = ExtResource("12_pddsd")
[node name="ConversionTimer" type="Timer" parent="."]
wait_time = 0.5
one_shot = true
[node name="SoundWorking" type="AudioStreamPlayer" parent="."]
stream = ExtResource("10_hy4ck")
[node name="SoundAbsorb" type="AudioStreamPlayer" parent="."]
stream = ExtResource("13_jvouj")
volume_db = -12.291
[node name="ConverterPlacementBody" parent="." instance=ExtResource("12_xld3l")]
[connection signal="input_event" from="." to="." method="_on_input_event"] [connection signal="input_event" from="." to="." method="_on_input_event"]
[connection signal="collected" from="Collector" to="." method="_on_collector_collected" flags=18] [connection signal="goal" from="Collector" to="." method="_on_collector_goal"]
[connection signal="goal" from="Collector" to="." method="_on_collector_goal" flags=18] [connection signal="timeout" from="WorkingTimer" to="." method="_on_working_timer_timeout"]
[connection signal="timeout" from="ConversionTimer" to="." method="_on_timer_timeout" flags=18]

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=24 format=3 uid="uid://cb1t7ylnkmt3t"] [gd_scene load_steps=26 format=3 uid="uid://cb1t7ylnkmt3t"]
[ext_resource type="Script" path="res://converters/converter.gd" id="1_fgju3"] [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://chc8wqc1pclbk" path="res://converters/gold_to_gem/gold_converter_back.png" id="2_hh4ft"]
@ -9,9 +9,11 @@
[ext_resource type="Texture2D" uid="uid://b5uershakuq20" path="res://converters/gold_to_gem/gold_converter_front_5.png" id="7_ccs4f"] [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://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://c67lfbk4gf1ga" path="res://spawner/spawner.tscn" id="9_ojqfv"]
[ext_resource type="AudioStream" uid="uid://bpxjhl0aq3yrv" path="res://audio/conversione/suck2.wav" id="10_n1vu0"]
[ext_resource type="PackedScene" uid="uid://bawprh8kluilq" path="res://entity/gem/gem.tscn" id="10_op7xt"] [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://br25ip30mu174" path="res://audio/conversione/mechanic_sound.wav" id="11_lofho"]
[ext_resource type="AudioStream" uid="uid://cc4mqxq6mxmdg" path="res://audio/conversione/coin_to_gem.wav" id="11_sk30q"] [ext_resource type="AudioStream" uid="uid://cc4mqxq6mxmdg" path="res://audio/conversione/coin_to_gem.wav" id="11_sk30q"]
[ext_resource type="PackedScene" uid="uid://b3ev0md0jrpfj" path="res://converters/working_timer.tscn" id="11_tm4f6"]
[ext_resource type="PackedScene" uid="uid://bevj27e1ha8m3" path="res://converters/placement_obstruction.tscn" id="13_6o73w"] [ext_resource type="PackedScene" uid="uid://bevj27e1ha8m3" path="res://converters/placement_obstruction.tscn" id="13_6o73w"]
[sub_resource type="AtlasTexture" id="AtlasTexture_wy1v3"] [sub_resource type="AtlasTexture" id="AtlasTexture_wy1v3"]
@ -57,29 +59,25 @@ animations = [{
"speed": 10.5 "speed": 10.5
}] }]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_aslkt"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_qt67l"]
radius = 1.5 radius = 1.5
height = 28.0 height = 28.0
[sub_resource type="RectangleShape2D" id="RectangleShape2D_31dtl"] [sub_resource type="ConvexPolygonShape2D" id="ConvexPolygonShape2D_cbvu5"]
size = Vector2(26, 4) points = PackedVector2Array(0, 0, -16, 0, -16, -3, -5, -7, 5, -7, 16, -3, 16, 0)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_k11if"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_hnunv"]
size = Vector2(26, 5) size = Vector2(26, 5)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jeo5f"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_h53k7"]
size = Vector2(26, 8.83334) size = Vector2(16, 4)
[node name="GoldConverter" type="StaticBody2D" node_paths=PackedStringArray("sprite_front", "conversion_timer", "sound_working", "sound_complete", "spawner")] [node name="GoldConverter" type="StaticBody2D" node_paths=PackedStringArray("spawner")]
scale = Vector2(3, 3) scale = Vector2(3, 3)
collision_layer = 8 collision_layer = 8
collision_mask = 0 collision_mask = 0
input_pickable = true input_pickable = true
script = ExtResource("1_fgju3") script = ExtResource("1_fgju3")
sprite_front = NodePath("SpriteFront")
conversion_timer = NodePath("ConversionTimer")
sound_working = NodePath("SoundWorking")
sound_complete = NodePath("Spawner/SoundComplete")
spawner = NodePath("Spawner") spawner = NodePath("Spawner")
[node name="SpriteBack" type="Sprite2D" parent="."] [node name="SpriteBack" type="Sprite2D" parent="."]
@ -94,34 +92,54 @@ position = Vector2(0, 2)
sprite_frames = SubResource("SpriteFrames_4m3dg") sprite_frames = SubResource("SpriteFrames_4m3dg")
frame_progress = 0.0969002 frame_progress = 0.0969002
[node name="PlacementObstruction" parent="." instance=ExtResource("13_6o73w")]
[node name="LeftWall" type="CollisionShape2D" parent="."] [node name="LeftWall" type="CollisionShape2D" parent="."]
z_index = 2 z_index = 2
position = Vector2(-14.5, -3) position = Vector2(-14.5, -3)
shape = SubResource("CapsuleShape2D_aslkt") shape = SubResource("CapsuleShape2D_qt67l")
debug_color = Color(0, 0, 0, 0.784314)
[node name="RightWall" type="CollisionShape2D" parent="."] [node name="RightWall" type="CollisionShape2D" parent="."]
z_index = 2 z_index = 2
position = Vector2(14.5, -3) position = Vector2(14.5, -3)
shape = SubResource("CapsuleShape2D_aslkt") shape = SubResource("CapsuleShape2D_qt67l")
debug_color = Color(0, 0, 0, 0.784314)
[node name="InnerWall" type="CollisionShape2D" parent="."] [node name="BottomWall" type="CollisionShape2D" parent="."]
z_index = 3 z_index = 3
position = Vector2(0, 4.5) position = Vector2(1.16196e-05, 9.08333)
rotation = 3.14159 rotation = 3.14159
shape = SubResource("RectangleShape2D_31dtl") shape = SubResource("ConvexPolygonShape2D_cbvu5")
one_way_collision = true one_way_collision = true
debug_color = Color(0, 0, 0, 0.784314)
[node name="Collector" parent="." instance=ExtResource("8_77gmi")] [node name="Collector" parent="." node_paths=PackedStringArray("sound_absorb") instance=ExtResource("8_77gmi")]
z_index = 2 z_index = 2
position = Vector2(0, 6.5)
collecting_types = Array[StringName]([&"Gold"]) collecting_types = Array[StringName]([&"Gold"])
sound_absorb = NodePath("SoundAbsorb")
collecting_amount = 10 collecting_amount = 10
[node name="CollectShape" type="CollisionShape2D" parent="Collector"] [node name="CollectShape" type="CollisionShape2D" parent="Collector"]
shape = SubResource("RectangleShape2D_k11if") shape = SubResource("RectangleShape2D_hnunv")
debug_color = Color(0, 0.701961, 0.188235, 0.419608) debug_color = Color(0, 0.701961, 0.188235, 0.419608)
[node name="SoundAbsorb" type="AudioStreamPlayer2D" parent="Collector"]
stream = ExtResource("10_n1vu0")
volume_db = -8.0
pitch_scale = 2.0
[node name="WorkingTimer" parent="." node_paths=PackedStringArray("working_sound") instance=ExtResource("11_tm4f6")]
working_sound = NodePath("SoundWorking")
[node name="SoundWorking" type="AudioStreamPlayer2D" parent="WorkingTimer"]
position = Vector2(0, 25)
stream = ExtResource("11_lofho")
pitch_scale = 1.08
[node name="Spawner" parent="." node_paths=PackedStringArray("sound_complete") instance=ExtResource("9_ojqfv")] [node name="Spawner" parent="." node_paths=PackedStringArray("sound_complete") instance=ExtResource("9_ojqfv")]
position = Vector2(0, 8) position = Vector2(0, 10)
scene = ExtResource("10_op7xt") scene = ExtResource("10_op7xt")
buffer_cap = 1 buffer_cap = 1
spawn_rect = Rect2(-8, 0, 16, 4) spawn_rect = Rect2(-8, 0, 16, 4)
@ -129,29 +147,19 @@ spawn_rotation_degrees_min = 80.0
spawn_rotation_degrees_max = 100.0 spawn_rotation_degrees_max = 100.0
overlapping_body_count_limit = 4 overlapping_body_count_limit = 4
sound_complete = NodePath("SoundComplete") sound_complete = NodePath("SoundComplete")
sound_complete_pitch_min = 1.88
sound_complete_pitch_max = 2.0
[node name="PreventSpawnShape" type="CollisionShape2D" parent="Spawner"] [node name="PreventSpawnShape" type="CollisionShape2D" parent="Spawner"]
z_index = 3 z_index = 3
position = Vector2(0, 3.5) position = Vector2(0, 2)
shape = SubResource("RectangleShape2D_jeo5f") shape = SubResource("RectangleShape2D_h53k7")
debug_color = Color(0.701961, 0, 0, 0.419608) debug_color = Color(0.701961, 0, 0, 0.419608)
[node name="SoundComplete" type="AudioStreamPlayer" parent="Spawner"] [node name="SoundComplete" type="AudioStreamPlayer2D" parent="Spawner"]
position = Vector2(0, 2)
stream = ExtResource("11_sk30q") stream = ExtResource("11_sk30q")
[node name="ConversionTimer" type="Timer" parent="."]
one_shot = true
[node name="SoundAbsorb" type="AudioStreamPlayer" parent="."]
stream = ExtResource("11_lofho")
[node name="SoundWorking" type="AudioStreamPlayer" parent="."]
stream = ExtResource("11_lofho")
[node name="ConverterPlacementBody" parent="." instance=ExtResource("13_6o73w")]
[connection signal="input_event" from="." to="." method="_on_input_event"] [connection signal="input_event" from="." to="." method="_on_input_event"]
[connection signal="collected" from="Collector" to="." method="_on_collector_collected" flags=18] [connection signal="goal" from="Collector" to="." method="_on_collector_goal"]
[connection signal="goal" from="Collector" to="." method="_on_collector_goal" flags=18] [connection signal="timeout" from="WorkingTimer" to="." method="_on_working_timer_timeout"]
[connection signal="spawned" from="Spawner" to="." method="_on_gold_converter_spawner_spawned"]
[connection signal="timeout" from="ConversionTimer" to="." method="_on_timer_timeout" flags=18]

View file

@ -138,6 +138,8 @@ z_index = 2
texture_filter = 1 texture_filter = 1
sprite_frames = SubResource("SpriteFrames_qqah4") sprite_frames = SubResource("SpriteFrames_qqah4")
[node name="PlacementObstruction" parent="." instance=ExtResource("17_udaa3")]
[node name="LeftWall" type="CollisionShape2D" parent="."] [node name="LeftWall" type="CollisionShape2D" parent="."]
z_index = 2 z_index = 2
position = Vector2(-14.5, -3) position = Vector2(-14.5, -3)
@ -242,8 +244,6 @@ texture_filter = 1
sprite_frames = SubResource("SpriteFrames_psnir") sprite_frames = SubResource("SpriteFrames_psnir")
frame_progress = 0.228399 frame_progress = 0.228399
[node name="ConverterPlacementBody" parent="." instance=ExtResource("17_udaa3")]
[connection signal="input_event" from="." to="." method="_on_input_event"] [connection signal="input_event" from="." to="." method="_on_input_event"]
[connection signal="collected" from="GoldCollector" to="." method="_on_gold_collector_collected"] [connection signal="collected" from="GoldCollector" to="." method="_on_gold_collector_collected"]
[connection signal="collected" from="GemCollector" to="." method="_on_gem_collector_collected"] [connection signal="collected" from="GemCollector" to="." method="_on_gem_collector_collected"]

View file

@ -65,7 +65,7 @@ func COMPAT_set_to_purchasable_item(pi: PurchasableItem):
push_warning("COMPAT_set_to_purchasable_item is deprecated.") push_warning("COMPAT_set_to_purchasable_item is deprecated.")
instantiator.scene_to_instantiate = pi.item_scene instantiator.scene_to_instantiate = pi.item_scene
var item_scene = pi.item_scene.instantiate() var item_scene = pi.item_scene.instantiate()
placement_shape.shape = item_scene.get_node("ConverterPlacementBody/FullConverterShape").shape placement_shape.shape = item_scene.get_node("PlacementObstruction/ShieldConverterObstructionShape").shape
placement_shape.scale = item_scene.scale placement_shape.scale = item_scene.scale
item_scene.queue_free() item_scene.queue_free()
preview_sprite.texture = pi.item_icon preview_sprite.texture = pi.item_icon

View file

@ -1,7 +1,7 @@
[gd_scene load_steps=8 format=3 uid="uid://qtk4tm6l367w"] [gd_scene load_steps=8 format=3 uid="uid://qtk4tm6l367w"]
[ext_resource type="Script" path="res://interface/ghost/ghost.gd" id="1_1bq64"] [ext_resource type="Script" path="res://interface/ghost/ghost.gd" id="1_1bq64"]
[ext_resource type="PackedScene" uid="uid://c3p0jdf7416ac" path="res://converters/full_converter_shape.tscn" id="2_bo8dp"] [ext_resource type="PackedScene" uid="uid://c3p0jdf7416ac" path="res://converters/shield_converter_obstruction_shape.tscn" id="2_bo8dp"]
[ext_resource type="PackedScene" uid="uid://cgpjm06hleokk" path="res://interface/ghost/precise_touch_placer.tscn" id="3_70ahv"] [ext_resource type="PackedScene" uid="uid://cgpjm06hleokk" path="res://interface/ghost/precise_touch_placer.tscn" id="3_70ahv"]
[ext_resource type="PackedScene" uid="uid://dhrtfpyfsdf3f" path="res://interface/ghost/instantiator.tscn" id="4_f7fmh"] [ext_resource type="PackedScene" uid="uid://dhrtfpyfsdf3f" path="res://interface/ghost/instantiator.tscn" id="4_f7fmh"]
[ext_resource type="PackedScene" uid="uid://cm3gvvcsh8i7a" path="res://interface/ghost/overlap_checker.tscn" id="5_twds7"] [ext_resource type="PackedScene" uid="uid://cm3gvvcsh8i7a" path="res://interface/ghost/overlap_checker.tscn" id="5_twds7"]

View file

@ -152,7 +152,6 @@ item_cost_text = "20 gold"
item_scene = ExtResource("13_m0kio") item_scene = ExtResource("13_m0kio")
item_cost_type = &"Gold" item_cost_type = &"Gold"
item_cost_goal = 20 item_cost_goal = 20
has_unlocked = false
[node name="PurchasableItemPadding4" parent="Rows/PaddedScrollable/Scrollable/ScrollableItems/ConvertCategory" instance=ExtResource("3_4feaj")] [node name="PurchasableItemPadding4" parent="Rows/PaddedScrollable/Scrollable/ScrollableItems/ConvertCategory" instance=ExtResource("3_4feaj")]
layout_mode = 2 layout_mode = 2
@ -166,7 +165,6 @@ item_cost_text = "20 gold"
item_scene = ExtResource("16_7ok54") item_scene = ExtResource("16_7ok54")
item_cost_type = &"Gold" item_cost_type = &"Gold"
item_cost_goal = 20 item_cost_goal = 20
has_unlocked = false
[node name="PurchasableItemPadding6" parent="Rows/PaddedScrollable/Scrollable/ScrollableItems/ConvertCategory" instance=ExtResource("3_4feaj")] [node name="PurchasableItemPadding6" parent="Rows/PaddedScrollable/Scrollable/ScrollableItems/ConvertCategory" instance=ExtResource("3_4feaj")]
layout_mode = 2 layout_mode = 2
@ -180,7 +178,6 @@ item_cost_text = "30 gems"
item_scene = ExtResource("14_tgckt") item_scene = ExtResource("14_tgckt")
item_cost_type = &"Gem" item_cost_type = &"Gem"
item_cost_goal = 30 item_cost_goal = 30
has_unlocked = false
[node name="PurchasableItemPadding7" parent="Rows/PaddedScrollable/Scrollable/ScrollableItems/ConvertCategory" instance=ExtResource("3_4feaj")] [node name="PurchasableItemPadding7" parent="Rows/PaddedScrollable/Scrollable/ScrollableItems/ConvertCategory" instance=ExtResource("3_4feaj")]
layout_mode = 2 layout_mode = 2