1
Fork 0
mirror of https://github.com/Steffo99/swear-jar.git synced 2024-11-22 07:44:17 +00:00

Furnace ready

This commit is contained in:
Matteo Balugani 2023-10-02 16:32:23 +02:00
parent 72a007f5c2
commit 320c582507
8 changed files with 94 additions and 103 deletions

BIN
audio/conversione/drop_in_lava.wav (Stored with Git LFS) Normal file

Binary file not shown.

View file

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

BIN
audio/conversione/lava.wav (Stored with Git LFS) Normal file

Binary file not shown.

View file

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

View file

@ -4,6 +4,7 @@ class_name Converter
var coda : int = 0 var coda : int = 0
@export var sprite_front: AnimatedSprite2D @export var sprite_front: AnimatedSprite2D
@export var sprite_back: AnimatedSprite2D
@export var conversion_timer: Timer @export var conversion_timer: Timer
@export var sound_working: AudioStreamPlayer @export var sound_working: AudioStreamPlayer
@export var sound_complete: AudioStreamPlayer @export var sound_complete: AudioStreamPlayer
@ -15,12 +16,14 @@ func _on_collector_goal():
func _process(_delta): func _process(_delta):
if coda>=1 and conversion_timer.is_stopped(): if coda>=1 and conversion_timer.is_stopped():
sprite_front.play() sprite_front.play()
sprite_back.play()
conversion_timer.start() conversion_timer.start()
sound_working.play() sound_working.play()
func _on_timer_timeout(): func _on_timer_timeout():
coda-=1 coda-=1
sprite_front.stop() sprite_front.stop()
sprite_back.play()
sound_working.stop() sound_working.stop()
sound_complete.play() sound_complete.play()
spawner.spawn() spawner.spawn()

View file

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

View file

@ -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="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"] [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="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://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="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="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://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://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://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="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"] [sub_resource type="AtlasTexture" id="AtlasTexture_uqtie"]
atlas = ExtResource("2_136t7") atlas = ExtResource("2_136t7")
@ -116,20 +117,27 @@ size = Vector2(26, 5)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jeo5f"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_jeo5f"]
size = Vector2(26, 8.83334) 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) scale = Vector2(3, 3)
script = ExtResource("1_qln0a") 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="."] [node name="SpriteBack" type="AnimatedSprite2D" parent="."]
texture_filter = 1 texture_filter = 1
position = Vector2(0, -14) position = Vector2(0, -14)
sprite_frames = SubResource("SpriteFrames_psnir") sprite_frames = SubResource("SpriteFrames_psnir")
frame_progress = 0.0929807 frame_progress = 0.883907
[node name="SpriteFront" type="AnimatedSprite2D" parent="."] [node name="SpriteFront" type="AnimatedSprite2D" parent="."]
z_index = 2
texture_filter = 1 texture_filter = 1
sprite_frames = SubResource("SpriteFrames_qqah4") sprite_frames = SubResource("SpriteFrames_qqah4")
frame_progress = 0.859387 frame_progress = 0.650314
[node name="LeftWall" type="CollisionShape2D" parent="."] [node name="LeftWall" type="CollisionShape2D" parent="."]
z_index = 2 z_index = 2
@ -147,9 +155,10 @@ position = Vector2(0, 4.5)
rotation = 3.14159 rotation = 3.14159
shape = SubResource("RectangleShape2D_31dtl") 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 z_index = 2
collecting_types = Array[StringName]([&"Copper"]) 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"]
@ -176,13 +185,18 @@ wait_time = 0.5
one_shot = true one_shot = true
[node name="SoundAbsorb" type="AudioStreamPlayer" parent="."] [node name="SoundAbsorb" type="AudioStreamPlayer" parent="."]
stream = ExtResource("6_w6x4p") stream = ExtResource("15_nahnf")
[node name="SoundWorking" type="AudioStreamPlayer" parent="."] [node name="SoundWorking" type="AudioStreamPlayer" parent="."]
stream = ExtResource("6_w6x4p") stream = ExtResource("16_ptmks")
[node name="SoundComplete" type="AudioStreamPlayer" parent="."] [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="collected" from="Collector" to="." method="_on_collector_collected" flags=18]
[connection signal="goal" from="Collector" to="." method="_on_collector_goal" flags=18] [connection signal="goal" from="Collector" to="." method="_on_collector_goal" flags=18]

View file

@ -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="Script" path="res://game/game.gd" id="1_i3ly0"]
[ext_resource type="PackedScene" uid="uid://bllsprv8orpn4" path="res://bottle/bottle.tscn" id="1_y7o2l"] [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="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="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://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"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_4uksi"]
size = Vector2(80, 80) size = Vector2(80, 80)
@ -81,7 +82,7 @@ shape = SubResource("RectangleShape2D_rh35r")
debug_color = Color(0, 0.6, 0.701961, 0) debug_color = Color(0, 0.6, 0.701961, 0)
[node name="CopperConverter" parent="." instance=ExtResource("7_ipeok")] [node name="CopperConverter" parent="." instance=ExtResource("7_ipeok")]
position = Vector2(56, 390) position = Vector2(-85, 454)
metadata/_edit_group_ = true metadata/_edit_group_ = true
[node name="Spawner" parent="CopperConverter" index="6" node_paths=PackedStringArray("target")] [node name="Spawner" parent="CopperConverter" index="6" node_paths=PackedStringArray("target")]
@ -91,7 +92,7 @@ target = NodePath("../..")
position = Vector2(0, 4.08333) position = Vector2(0, 4.08333)
[node name="SilverConverter" parent="." instance=ExtResource("8_0bbpi")] [node name="SilverConverter" parent="." instance=ExtResource("8_0bbpi")]
position = Vector2(53, 273) position = Vector2(-86, 321)
rotation = -6.28319 rotation = -6.28319
metadata/_edit_group_ = true metadata/_edit_group_ = true
@ -179,12 +180,18 @@ shape = SubResource("RectangleShape2D_jed57")
debug_color = Color(0, 0, 0, 0.419608) debug_color = Color(0, 0, 0, 0.419608)
[node name="GemConverter" parent="." instance=ExtResource("16_e62br")] [node name="GemConverter" parent="." instance=ExtResource("16_e62br")]
position = Vector2(145, 180) position = Vector2(-89, 203)
metadata/_edit_group_ = true metadata/_edit_group_ = true
[node name="Spawner" parent="GemConverter" index="6" node_paths=PackedStringArray("target")] [node name="Spawner" parent="GemConverter" index="6" node_paths=PackedStringArray("target")]
target = NodePath("../..") 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="timeout" from="TimeSpawner/Timer" to="TimeSpawner" method="spawn"]
[connection signal="changed" from="Evaluator" to="." method="_on_score_changed"] [connection signal="changed" from="Evaluator" to="." method="_on_score_changed"]
[connection signal="collected" from="StoreCollector" to="." method="_on_store_collector_collected"] [connection signal="collected" from="StoreCollector" to="." method="_on_store_collector_collected"]
@ -192,3 +199,4 @@ target = NodePath("../..")
[editable path="CopperConverter"] [editable path="CopperConverter"]
[editable path="SilverConverter"] [editable path="SilverConverter"]
[editable path="GemConverter"] [editable path="GemConverter"]
[editable path="ItemConverter"]