mirror of
https://github.com/Steffo99/swear-jar.git
synced 2024-11-21 23:34:18 +00:00
Stuff
This commit is contained in:
parent
405df6d458
commit
27853e6e49
24 changed files with 83 additions and 67 deletions
|
@ -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)
|
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"]
|
[sub_resource type="TileSet" id="TileSet_tr7be"]
|
||||||
physics_layer_0/collision_layer = 3
|
physics_layer_0/collision_layer = 2
|
||||||
physics_layer_0/collision_mask = 3
|
physics_layer_0/collision_mask = 0
|
||||||
physics_layer_0/physics_material = SubResource("PhysicsMaterial_y0g3v")
|
physics_layer_0/physics_material = SubResource("PhysicsMaterial_y0g3v")
|
||||||
sources/1 = SubResource("TileSetAtlasSource_6tyce")
|
sources/1 = SubResource("TileSetAtlasSource_6tyce")
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
[gd_scene load_steps=3 format=3 uid="uid://c5w3b55aiui6c"]
|
[gd_scene load_steps=2 format=3 uid="uid://c5w3b55aiui6c"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://collector/collector.gd" id="1_1xtt5"]
|
[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" node_paths=PackedStringArray("sound_absorb")]
|
[node name="Collector" type="Area2D"]
|
||||||
|
collision_layer = 0
|
||||||
|
collision_mask = 4
|
||||||
script = ExtResource("1_1xtt5")
|
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"]
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||||
|
|
|
@ -59,10 +59,12 @@ size = Vector2(26, 4)
|
||||||
size = Vector2(26, 5)
|
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, 10)
|
||||||
|
|
||||||
[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("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_mas6k")
|
script = ExtResource("1_mas6k")
|
||||||
sprite_front = NodePath("SpriteFront")
|
sprite_front = NodePath("SpriteFront")
|
||||||
conversion_timer = NodePath("ConversionTimer")
|
conversion_timer = NodePath("ConversionTimer")
|
||||||
|
@ -124,9 +126,6 @@ debug_color = Color(0.701961, 0, 0, 0.419608)
|
||||||
wait_time = 0.5
|
wait_time = 0.5
|
||||||
one_shot = true
|
one_shot = true
|
||||||
|
|
||||||
[node name="SoundAbsorb" type="AudioStreamPlayer" parent="."]
|
|
||||||
stream = ExtResource("10_6hhch")
|
|
||||||
|
|
||||||
[node name="SoundWorking" type="AudioStreamPlayer" parent="."]
|
[node name="SoundWorking" type="AudioStreamPlayer" parent="."]
|
||||||
stream = ExtResource("10_6hhch")
|
stream = ExtResource("10_6hhch")
|
||||||
|
|
||||||
|
|
|
@ -1,36 +1,25 @@
|
||||||
[gd_scene load_steps=23 format=3 uid="uid://c4ew8x4gch275"]
|
[gd_scene load_steps=17 format=3 uid="uid://c4ew8x4gch275"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://converters/converter.gd" id="1_f5plk"]
|
[ext_resource type="Script" path="res://converters/converter.gd" id="1_f5plk"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bbn8t32v1ie0y" path="res://entity/gold_converter_back.png" id="2_4abgr"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://0u8wtb38l3s5" path="res://entity/gold_converter_front_1.png" id="3_rtp3d"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://bo46tom7khspd" path="res://entity/gold_converter_front_2.png" id="4_oathm"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dclhuc7h26brj" path="res://entity/gold_converter_front_3.png" id="5_5deah"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dn433fvnhgp5v" path="res://entity/gold_converter_front_4.png" id="6_isyc7"]
|
|
||||||
[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="7_m34js"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bfxmurfe4o44s" path="res://entity/gold_converter_front_5.png" id="7_w8dcp"]
|
|
||||||
[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="8_qwbjp"]
|
||||||
[ext_resource type="PackedScene" uid="uid://du3005kwybbrh" path="res://entity/coin_gold/coin_gold.tscn" id="10_5hiv4"]
|
[ext_resource type="PackedScene" uid="uid://du3005kwybbrh" path="res://entity/coin_gold/coin_gold.tscn" id="10_5hiv4"]
|
||||||
[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="10_f1h6i"]
|
||||||
[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="11_ywwn2"]
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wy1v3"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_wy1v3"]
|
||||||
atlas = ExtResource("3_rtp3d")
|
|
||||||
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_oathm")
|
|
||||||
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_5deah")
|
|
||||||
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_isyc7")
|
|
||||||
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_w8dcp")
|
|
||||||
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"]
|
||||||
|
@ -71,12 +60,13 @@ size = Vector2(26, 8.83334)
|
||||||
|
|
||||||
[node name="GemConverter" type="StaticBody2D"]
|
[node name="GemConverter" type="StaticBody2D"]
|
||||||
scale = Vector2(3, 3)
|
scale = Vector2(3, 3)
|
||||||
|
collision_layer = 8
|
||||||
|
collision_mask = 0
|
||||||
script = ExtResource("1_f5plk")
|
script = ExtResource("1_f5plk")
|
||||||
|
|
||||||
[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_4abgr")
|
|
||||||
|
|
||||||
[node name="SpriteFront" type="AnimatedSprite2D" parent="."]
|
[node name="SpriteFront" type="AnimatedSprite2D" parent="."]
|
||||||
z_index = 2
|
z_index = 2
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://chc8wqc1pclbk"
|
uid="uid://chc8wqc1pclbk"
|
||||||
path="res://.godot/imported/gold_converter_back.png-542530d6d643b64e20755f9b54d1da49.ctex"
|
path="res://.godot/imported/gold_converter_back.png-57f6151a59bebb5f4f377558fa7bed66.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://entity/gold_converter_back.png"
|
source_file="res://converters/gold_to_gem/gold_converter_back.png"
|
||||||
dest_files=["res://.godot/imported/gold_converter_back.png-542530d6d643b64e20755f9b54d1da49.ctex"]
|
dest_files=["res://.godot/imported/gold_converter_back.png-57f6151a59bebb5f4f377558fa7bed66.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://dgw5ip5qf5k7a"
|
uid="uid://dgw5ip5qf5k7a"
|
||||||
path="res://.godot/imported/gold_converter_front_1.png-20d40342907ebeaf5453b3fbc06f6b04.ctex"
|
path="res://.godot/imported/gold_converter_front_1.png-8d8215c09612bfed0000441abb0b28cd.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://entity/gold_converter_front_1.png"
|
source_file="res://converters/gold_to_gem/gold_converter_front_1.png"
|
||||||
dest_files=["res://.godot/imported/gold_converter_front_1.png-20d40342907ebeaf5453b3fbc06f6b04.ctex"]
|
dest_files=["res://.godot/imported/gold_converter_front_1.png-8d8215c09612bfed0000441abb0b28cd.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://h7hu4paxjq84"
|
uid="uid://h7hu4paxjq84"
|
||||||
path="res://.godot/imported/gold_converter_front_2.png-6b48a8121d01d35430dedd6a7ebaaed7.ctex"
|
path="res://.godot/imported/gold_converter_front_2.png-be7df5216327f8bc15affb3be160f525.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://entity/gold_converter_front_2.png"
|
source_file="res://converters/gold_to_gem/gold_converter_front_2.png"
|
||||||
dest_files=["res://.godot/imported/gold_converter_front_2.png-6b48a8121d01d35430dedd6a7ebaaed7.ctex"]
|
dest_files=["res://.godot/imported/gold_converter_front_2.png-be7df5216327f8bc15affb3be160f525.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://dlog0f5nk4b3c"
|
uid="uid://dlog0f5nk4b3c"
|
||||||
path="res://.godot/imported/gold_converter_front_3.png-4b8a07d186c945c584be92c7bbbf79b8.ctex"
|
path="res://.godot/imported/gold_converter_front_3.png-850e0ec6590a97fe109779989afaac4a.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://entity/gold_converter_front_3.png"
|
source_file="res://converters/gold_to_gem/gold_converter_front_3.png"
|
||||||
dest_files=["res://.godot/imported/gold_converter_front_3.png-4b8a07d186c945c584be92c7bbbf79b8.ctex"]
|
dest_files=["res://.godot/imported/gold_converter_front_3.png-850e0ec6590a97fe109779989afaac4a.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://cj5m5k0hr3wmw"
|
uid="uid://cj5m5k0hr3wmw"
|
||||||
path="res://.godot/imported/gold_converter_front_4.png-1dd90efaf325965268d803bbed7fda3b.ctex"
|
path="res://.godot/imported/gold_converter_front_4.png-16819d42eb9c86094f5063cdede729fb.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://entity/gold_converter_front_4.png"
|
source_file="res://converters/gold_to_gem/gold_converter_front_4.png"
|
||||||
dest_files=["res://.godot/imported/gold_converter_front_4.png-1dd90efaf325965268d803bbed7fda3b.ctex"]
|
dest_files=["res://.godot/imported/gold_converter_front_4.png-16819d42eb9c86094f5063cdede729fb.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://b5uershakuq20"
|
uid="uid://b5uershakuq20"
|
||||||
path="res://.godot/imported/gold_converter_front_5.png-a825d75eb13b041b1a6213049c3d7637.ctex"
|
path="res://.godot/imported/gold_converter_front_5.png-521650e19092d447f412bf69ceea3d57.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://entity/gold_converter_front_5.png"
|
source_file="res://converters/gold_to_gem/gold_converter_front_5.png"
|
||||||
dest_files=["res://.godot/imported/gold_converter_front_5.png-a825d75eb13b041b1a6213049c3d7637.ctex"]
|
dest_files=["res://.godot/imported/gold_converter_front_5.png-521650e19092d447f412bf69ceea3d57.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
|
@ -47,6 +47,8 @@ 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")
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
[ext_resource type="PackedScene" uid="uid://c3kitncwpi42j" path="res://entity/coin_copper/coin_copper.tscn" id="4_5oayc"]
|
[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="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://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://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://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://bawprh8kluilq" path="res://entity/gem/gem.tscn" id="8_a3sk0"]
|
||||||
|
@ -18,12 +17,12 @@
|
||||||
[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://qtk4tm6l367w" path="res://interface/ghost.tscn" id="16_8vhx6"]
|
[ext_resource type="PackedScene" uid="uid://qtk4tm6l367w" path="res://interface/ghost.tscn" id="16_8vhx6"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4uksi"]
|
|
||||||
size = Vector2(80, 80)
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_rh35r"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_rh35r"]
|
||||||
size = Vector2(240, 384)
|
size = Vector2(240, 384)
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4uksi"]
|
||||||
|
size = Vector2(80, 80)
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_i50bq"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_i50bq"]
|
||||||
size = Vector2(540, 135)
|
size = Vector2(540, 135)
|
||||||
|
|
||||||
|
@ -42,11 +41,25 @@ upgrade_gold_texture = ExtResource("4_i557v")
|
||||||
|
|
||||||
[node name="Ghost" parent="." instance=ExtResource("16_8vhx6")]
|
[node name="Ghost" parent="." instance=ExtResource("16_8vhx6")]
|
||||||
position = Vector2(90, 306)
|
position = Vector2(90, 306)
|
||||||
collision_layer = 8
|
|
||||||
collision_mask = 6
|
|
||||||
|
|
||||||
[node name="Bottle" parent="." instance=ExtResource("1_y7o2l")]
|
[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="Evaluator" parent="Bottle" instance=ExtResource("6_my6nv")]
|
||||||
|
position = Vector2(136, 272)
|
||||||
|
|
||||||
|
[node name="BottleShape" type="CollisionShape2D" parent="Bottle/Evaluator"]
|
||||||
|
shape = SubResource("RectangleShape2D_rh35r")
|
||||||
|
debug_color = Color(0, 0.6, 0.701961, 0)
|
||||||
|
|
||||||
[node name="TimeSpawner" parent="." node_paths=PackedStringArray("target") instance=ExtResource("3_qwsty")]
|
[node name="TimeSpawner" parent="." node_paths=PackedStringArray("target") instance=ExtResource("3_qwsty")]
|
||||||
position = Vector2(136, 0)
|
position = Vector2(136, 0)
|
||||||
scene = ExtResource("8_a3sk0")
|
scene = ExtResource("8_a3sk0")
|
||||||
|
@ -79,13 +92,6 @@ 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="Evaluator" parent="." instance=ExtResource("6_my6nv")]
|
|
||||||
position = Vector2(136, 272)
|
|
||||||
|
|
||||||
[node name="BottleShape" type="CollisionShape2D" parent="Evaluator"]
|
|
||||||
shape = SubResource("RectangleShape2D_rh35r")
|
|
||||||
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(62, 176)
|
position = Vector2(62, 176)
|
||||||
metadata/_edit_group_ = true
|
metadata/_edit_group_ = true
|
||||||
|
@ -180,8 +186,8 @@ 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)
|
||||||
|
|
||||||
|
[connection signal="changed" from="Bottle/Evaluator" to="." method="_on_score_changed"]
|
||||||
[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="collected" from="StoreCollector" to="." method="_on_store_collector_collected"]
|
[connection signal="collected" from="StoreCollector" to="." method="_on_store_collector_collected"]
|
||||||
|
|
||||||
[editable path="CopperConverter"]
|
[editable path="CopperConverter"]
|
||||||
|
|
|
@ -4,6 +4,7 @@ class_name Ghost
|
||||||
var is_dragging: bool
|
var is_dragging: bool
|
||||||
var previous_position: Vector2
|
var previous_position: Vector2
|
||||||
|
|
||||||
|
|
||||||
func _input(event: InputEvent):
|
func _input(event: InputEvent):
|
||||||
if event is InputEventMouseButton:
|
if event is InputEventMouseButton:
|
||||||
is_dragging = event.pressed
|
is_dragging = event.pressed
|
||||||
|
@ -15,11 +16,27 @@ func _input(event: InputEvent):
|
||||||
if is_dragging:
|
if is_dragging:
|
||||||
if event is InputEventMouseMotion:
|
if event is InputEventMouseMotion:
|
||||||
var delta = event.position - previous_position
|
var delta = event.position - previous_position
|
||||||
print(delta)
|
move_and_check(position + delta)
|
||||||
position += delta
|
|
||||||
previous_position = event.position
|
previous_position = event.position
|
||||||
elif event is InputEventScreenDrag:
|
elif event is InputEventScreenDrag:
|
||||||
var delta = event.position - previous_position
|
var delta = event.position - previous_position
|
||||||
print(delta)
|
move_and_check(position + delta)
|
||||||
position += delta
|
|
||||||
previous_position = event.position
|
previous_position = event.position
|
||||||
|
|
||||||
|
|
||||||
|
@onready var sprite: Sprite2D = $Sprite
|
||||||
|
|
||||||
|
@export var can_place: bool:
|
||||||
|
get:
|
||||||
|
return can_place
|
||||||
|
set(value):
|
||||||
|
if value:
|
||||||
|
sprite.modulate = Color(1.0, 1.0, 1.0, 0.5)
|
||||||
|
else:
|
||||||
|
sprite.modulate = Color(1.0, 0.0, 0.0, 0.5)
|
||||||
|
|
||||||
|
|
||||||
|
func move_and_check(destination):
|
||||||
|
position = destination
|
||||||
|
can_place = not has_overlapping_bodies()
|
||||||
|
print(can_place)
|
||||||
|
|
|
@ -8,13 +8,16 @@ size = Vector2(34, 34)
|
||||||
|
|
||||||
[node name="Ghost" type="Area2D"]
|
[node name="Ghost" type="Area2D"]
|
||||||
scale = Vector2(3, 3)
|
scale = Vector2(3, 3)
|
||||||
|
collision_layer = 16
|
||||||
|
collision_mask = 10
|
||||||
input_pickable = false
|
input_pickable = false
|
||||||
script = ExtResource("1_gvls7")
|
script = ExtResource("1_gvls7")
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite2D" parent="."]
|
[node name="Sprite" type="Sprite2D" parent="."]
|
||||||
modulate = Color(1, 1, 1, 0.470588)
|
modulate = Color(1, 1, 1, 0.5)
|
||||||
z_index = 10
|
z_index = 10
|
||||||
texture = ExtResource("1_lo8gj")
|
texture = ExtResource("1_lo8gj")
|
||||||
|
|
||||||
[node name="Shape" type="CollisionShape2D" parent="."]
|
[node name="Shape" type="CollisionShape2D" parent="."]
|
||||||
shape = SubResource("RectangleShape2D_hmopu")
|
shape = SubResource("RectangleShape2D_hmopu")
|
||||||
|
debug_color = Color(0, 0.6, 0.701961, 0)
|
||||||
|
|
|
@ -36,7 +36,6 @@ anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
mouse_default_cursor_shape = 5
|
|
||||||
stretch = true
|
stretch = true
|
||||||
|
|
||||||
[node name="Viewport" type="SubViewport" parent="CustomUI/GameViewport"]
|
[node name="Viewport" type="SubViewport" parent="CustomUI/GameViewport"]
|
||||||
|
|
|
@ -30,7 +30,8 @@ window/handheld/orientation=1
|
||||||
2d_physics/layer_1="Default"
|
2d_physics/layer_1="Default"
|
||||||
2d_physics/layer_2="Bottle"
|
2d_physics/layer_2="Bottle"
|
||||||
2d_physics/layer_3="Entities"
|
2d_physics/layer_3="Entities"
|
||||||
2d_physics/layer_4="Ghost"
|
2d_physics/layer_4="Converter"
|
||||||
|
2d_physics/layer_5="Ghost"
|
||||||
|
|
||||||
[physics]
|
[physics]
|
||||||
|
|
||||||
|
|
|
@ -3,4 +3,6 @@
|
||||||
[ext_resource type="Script" path="res://spawner/spawner.gd" id="1_xqfmg"]
|
[ext_resource type="Script" path="res://spawner/spawner.gd" id="1_xqfmg"]
|
||||||
|
|
||||||
[node name="Spawner" type="Area2D"]
|
[node name="Spawner" type="Area2D"]
|
||||||
|
collision_layer = 0
|
||||||
|
collision_mask = 4
|
||||||
script = ExtResource("1_xqfmg")
|
script = ExtResource("1_xqfmg")
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
[ext_resource type="Script" path="res://value/evaluator.gd" id="1_sjx78"]
|
[ext_resource type="Script" path="res://value/evaluator.gd" id="1_sjx78"]
|
||||||
|
|
||||||
[node name="Evaluator" type="Area2D"]
|
[node name="Evaluator" type="Area2D"]
|
||||||
|
collision_layer = 0
|
||||||
|
collision_mask = 4
|
||||||
script = ExtResource("1_sjx78")
|
script = ExtResource("1_sjx78")
|
||||||
|
|
||||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||||
|
|
Loading…
Reference in a new issue