mirror of
https://github.com/Steffo99/swear-jar.git
synced 2024-11-22 07:44:17 +00:00
converters fix
This commit is contained in:
parent
b15931b7d8
commit
e492e9ff43
5 changed files with 46 additions and 39 deletions
|
@ -16,14 +16,16 @@ 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()
|
if not sprite_back==null:
|
||||||
|
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.stop()
|
if not sprite_back==null:
|
||||||
|
sprite_back.stop()
|
||||||
sound_working.stop()
|
sound_working.stop()
|
||||||
sound_complete.play()
|
sound_complete.play()
|
||||||
spawner.spawn()
|
spawner.spawn()
|
||||||
|
|
|
@ -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="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_icys1"]
|
[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_n6auo"]
|
[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_dxxyk"]
|
[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_lnr8u"]
|
[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_nh41p"]
|
[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_jfv3m"]
|
[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="7_m34js"]
|
[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="8_qwbjp"]
|
[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="9_2ugi1"]
|
[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="10_f1h6i"]
|
[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="11_ywwn2"]
|
[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"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_wy1v3"]
|
||||||
atlas = ExtResource("3_n6auo")
|
atlas = ExtResource("3_ofrsl")
|
||||||
region = Rect2(0, 4, 32, 31)
|
region = Rect2(0, 4, 32, 31)
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_2164d"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_2164d"]
|
||||||
atlas = ExtResource("4_dxxyk")
|
atlas = ExtResource("4_bfibv")
|
||||||
region = Rect2(0, 4, 32, 31)
|
region = Rect2(0, 4, 32, 31)
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_i5584"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_i5584"]
|
||||||
atlas = ExtResource("5_lnr8u")
|
atlas = ExtResource("5_grq6d")
|
||||||
region = Rect2(0, 4, 32, 31)
|
region = Rect2(0, 4, 32, 31)
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qad4c"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qad4c"]
|
||||||
atlas = ExtResource("6_nh41p")
|
atlas = ExtResource("6_m1sjp")
|
||||||
region = Rect2(0, 4, 32, 31)
|
region = Rect2(0, 4, 32, 31)
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_600qi"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_600qi"]
|
||||||
atlas = ExtResource("7_jfv3m")
|
atlas = ExtResource("7_ccs4f")
|
||||||
region = Rect2(0, 4, 32, 31)
|
region = Rect2(0, 4, 32, 31)
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id="SpriteFrames_4m3dg"]
|
[sub_resource type="SpriteFrames" id="SpriteFrames_4m3dg"]
|
||||||
|
@ -53,7 +53,7 @@ animations = [{
|
||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"default",
|
"name": &"default",
|
||||||
"speed": 15.0
|
"speed": 10.5
|
||||||
}]
|
}]
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_aslkt"]
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_aslkt"]
|
||||||
|
@ -69,11 +69,10 @@ 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="GemConverter" type="StaticBody2D" node_paths=PackedStringArray("sprite_front", "conversion_timer", "sound_working", "sound_complete", "spawner")]
|
[node name="GoldConverter" type="StaticBody2D" node_paths=PackedStringArray("sprite_front", "conversion_timer", "sound_working", "sound_complete", "spawner")]
|
||||||
scale = Vector2(3, 3)
|
|
||||||
collision_layer = 8
|
collision_layer = 8
|
||||||
collision_mask = 0
|
collision_mask = 0
|
||||||
script = ExtResource("1_f5plk")
|
script = ExtResource("1_fgju3")
|
||||||
sprite_front = NodePath("SpriteFront")
|
sprite_front = NodePath("SpriteFront")
|
||||||
conversion_timer = NodePath("ConversionTimer")
|
conversion_timer = NodePath("ConversionTimer")
|
||||||
sound_working = NodePath("SoundWorking")
|
sound_working = NodePath("SoundWorking")
|
||||||
|
@ -83,7 +82,7 @@ spawner = NodePath("Spawner")
|
||||||
[node name="SpriteBack" type="Sprite2D" parent="."]
|
[node name="SpriteBack" type="Sprite2D" parent="."]
|
||||||
z_index = -2
|
z_index = -2
|
||||||
texture_filter = 1
|
texture_filter = 1
|
||||||
texture = ExtResource("2_icys1")
|
texture = ExtResource("2_hh4ft")
|
||||||
|
|
||||||
[node name="SpriteFront" type="AnimatedSprite2D" parent="."]
|
[node name="SpriteFront" type="AnimatedSprite2D" parent="."]
|
||||||
z_index = 2
|
z_index = 2
|
||||||
|
@ -108,7 +107,7 @@ 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("7_m34js")]
|
[node name="Collector" parent="." instance=ExtResource("8_77gmi")]
|
||||||
z_index = 2
|
z_index = 2
|
||||||
collecting_types = Array[StringName]([&"Gold"])
|
collecting_types = Array[StringName]([&"Gold"])
|
||||||
collecting_amount = 10
|
collecting_amount = 10
|
||||||
|
@ -117,9 +116,9 @@ collecting_amount = 10
|
||||||
shape = SubResource("RectangleShape2D_k11if")
|
shape = SubResource("RectangleShape2D_k11if")
|
||||||
debug_color = Color(0, 0.701961, 0.188235, 0.419608)
|
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)
|
position = Vector2(0, 8)
|
||||||
scene = ExtResource("9_2ugi1")
|
scene = ExtResource("10_op7xt")
|
||||||
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
|
||||||
|
@ -133,17 +132,16 @@ shape = SubResource("RectangleShape2D_jeo5f")
|
||||||
debug_color = Color(0.701961, 0, 0, 0.419608)
|
debug_color = Color(0.701961, 0, 0, 0.419608)
|
||||||
|
|
||||||
[node name="ConversionTimer" type="Timer" parent="."]
|
[node name="ConversionTimer" type="Timer" parent="."]
|
||||||
wait_time = 0.5
|
|
||||||
one_shot = true
|
one_shot = true
|
||||||
|
|
||||||
[node name="SoundAbsorb" type="AudioStreamPlayer" parent="."]
|
[node name="SoundAbsorb" type="AudioStreamPlayer" parent="."]
|
||||||
stream = ExtResource("10_f1h6i")
|
stream = ExtResource("11_lofho")
|
||||||
|
|
||||||
[node name="SoundWorking" type="AudioStreamPlayer" parent="."]
|
[node name="SoundWorking" type="AudioStreamPlayer" parent="."]
|
||||||
stream = ExtResource("10_f1h6i")
|
stream = ExtResource("11_lofho")
|
||||||
|
|
||||||
[node name="SoundComplete" type="AudioStreamPlayer" parent="."]
|
[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="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]
|
|
@ -180,7 +180,6 @@ shape = SubResource("RectangleShape2D_jeo5f")
|
||||||
debug_color = Color(0.701961, 0, 0, 0.419608)
|
debug_color = Color(0.701961, 0, 0, 0.419608)
|
||||||
|
|
||||||
[node name="ConversionTimer" type="Timer" parent="."]
|
[node name="ConversionTimer" type="Timer" parent="."]
|
||||||
wait_time = 0.5
|
|
||||||
one_shot = true
|
one_shot = true
|
||||||
|
|
||||||
[node name="SoundAbsorb" type="AudioStreamPlayer" parent="."]
|
[node name="SoundAbsorb" type="AudioStreamPlayer" parent="."]
|
||||||
|
|
|
@ -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")]
|
[node name="SilverConverter" type="StaticBody2D" node_paths=PackedStringArray("sprite_front", "conversion_timer", "sound_working", "sound_complete", "spawner")]
|
||||||
scale = Vector2(3, 3)
|
scale = Vector2(3, 3)
|
||||||
collision_layer = 8
|
|
||||||
collision_mask = 0
|
|
||||||
script = ExtResource("1_chhfg")
|
script = ExtResource("1_chhfg")
|
||||||
sprite_front = NodePath("SpriteFront")
|
sprite_front = NodePath("SpriteFront")
|
||||||
conversion_timer = NodePath("ConversionTimer")
|
conversion_timer = NodePath("ConversionTimer")
|
||||||
|
|
|
@ -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="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"]
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
[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" 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"]
|
[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"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_rh35r"]
|
||||||
size = Vector2(240, 384)
|
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="GravityFromGyro" parent="." instance=ExtResource("2_h2pfr")]
|
||||||
|
|
||||||
[node name="CopperConverter" parent="." instance=ExtResource("7_ipeok")]
|
[node name="CopperConverter" parent="." instance=ExtResource("7_ipeok")]
|
||||||
position = Vector2(-81, 181)
|
position = Vector2(-83, 227)
|
||||||
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")]
|
||||||
|
@ -104,7 +105,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(-84, 312)
|
position = Vector2(354, 361)
|
||||||
rotation = -3.14159
|
rotation = -3.14159
|
||||||
metadata/_edit_group_ = true
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
@ -188,8 +189,16 @@ position = Vector2(405, 540)
|
||||||
shape = SubResource("RectangleShape2D_jed57")
|
shape = SubResource("RectangleShape2D_jed57")
|
||||||
debug_color = Color(0, 0, 0, 0.419608)
|
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")]
|
[node name="ItemConverter" parent="." instance=ExtResource("17_fi36f")]
|
||||||
position = Vector2(134, 191)
|
position = Vector2(365, 196)
|
||||||
metadata/_edit_group_ = true
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
[node name="Spawner" parent="ItemConverter" index="6" node_paths=PackedStringArray("target")]
|
[node name="Spawner" parent="ItemConverter" index="6" node_paths=PackedStringArray("target")]
|
||||||
|
@ -201,4 +210,5 @@ target = NodePath("../..")
|
||||||
|
|
||||||
[editable path="CopperConverter"]
|
[editable path="CopperConverter"]
|
||||||
[editable path="SilverConverter"]
|
[editable path="SilverConverter"]
|
||||||
|
[editable path="GoldConverter"]
|
||||||
[editable path="ItemConverter"]
|
[editable path="ItemConverter"]
|
||||||
|
|
Loading…
Reference in a new issue