StickerClone/maps/map1.tscn
Lucas Peter 79a577272a
update sticker code
Rework code, make sticker a Area2D Node that handle all sticker logic
2024-07-31 12:21:17 +02:00

467 lines
16 KiB
Text

[gd_scene load_steps=27 format=3 uid="uid://wlqsvbqpcbh"]
[ext_resource type="Texture2D" uid="uid://cacwy4tka88k1" path="res://maps/map1.tres" id="1_pt5vq"]
[ext_resource type="PackedScene" uid="uid://do65rgg0p2plt" path="res://core/Door.tscn" id="4_lwk0u"]
[ext_resource type="Texture2D" uid="uid://ddajgcwn5ip4c" path="res://textures/sprites/plants_bush1.tres" id="4_m2p3o"]
[ext_resource type="PackedScene" uid="uid://bddcriwo55x8k" path="res://prefab/prefab_woddenbridge.tscn" id="4_okpsn"]
[ext_resource type="Texture2D" uid="uid://ciyh3rnoo4uk" path="res://textures/atlas/SimpleParticles_All_01_SPRT.png" id="6_0dctx"]
[ext_resource type="Texture2D" uid="uid://dcgjlblm2rpy4" path="res://textures/2d_lights_and_shadows_neutral_point_light.webp" id="7_4swoj"]
[ext_resource type="Script" path="res://core/sticker.gd" id="8_c6p5e"]
[ext_resource type="Texture2D" uid="uid://dnomlcslicb3k" path="res://textures/sprites/props_fire1.tres" id="10_2ugv3"]
[sub_resource type="AtlasTexture" id="AtlasTexture_gnudx"]
region = Rect2(252, 16, 108, 256)
[sub_resource type="AtlasTexture" id="AtlasTexture_ex6vq"]
region = Rect2(0, 16, 228, 80)
[sub_resource type="AtlasTexture" id="AtlasTexture_2wdar"]
region = Rect2(384, 64, 288, 224)
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_lfx7b"]
radius = 80.0
height = 254.0
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_dqo8w"]
radius = 70.0
height = 512.0
[sub_resource type="AtlasTexture" id="AtlasTexture_rn40i"]
region = Rect2(736, 96, 224, 160)
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_b3366"]
radius = 65.0
height = 184.05
[sub_resource type="AtlasTexture" id="AtlasTexture_vun1v"]
region = Rect2(288, 256, 192, 160)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4cdlc"]
size = Vector2(133.06, 62.73)
[sub_resource type="AtlasTexture" id="AtlasTexture_wpoj4"]
region = Rect2(1440, 1376, 256, 256)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_hk5e3"]
size = Vector2(201.89, 146.45)
[sub_resource type="AtlasTexture" id="AtlasTexture_w86nr"]
region = Rect2(544, 32, 160, 192)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_tss3y"]
size = Vector2(127.875, 25.5)
[sub_resource type="AtlasTexture" id="AtlasTexture_4j533"]
region = Rect2(1356, 1216, 192, 80)
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_jw3i8"]
lifetime_randomness = 0.2
particle_flag_disable_z = true
emission_shape_scale = Vector3(2, 1, 1)
emission_shape = 1
emission_sphere_radius = 20.0
angle_min = -12.5
angle_max = 12.5
gravity = Vector3(0, -20, 0)
[sub_resource type="AtlasTexture" id="AtlasTexture_c24s7"]
atlas = ExtResource("6_0dctx")
region = Rect2(0, 0, 128, 160)
[sub_resource type="CircleShape2D" id="CircleShape2D_5wedp"]
radius = 42.25
[sub_resource type="CircleShape2D" id="CircleShape2D_wkggp"]
radius = 72.88
[node name="Map1" type="Node2D"]
z_as_relative = false
y_sort_enabled = true
[node name="Floors05Sprt" type="Sprite2D" parent="."]
z_index = -10
z_as_relative = false
scale = Vector2(6, 6)
texture = ExtResource("1_pt5vq")
region_rect = Rect2(0, 0, 1024, 992)
metadata/_edit_lock_ = true
[node name="StaticBody2D" type="StaticBody2D" parent="Floors05Sprt"]
metadata/_edit_lock_ = true
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Floors05Sprt/StaticBody2D"]
polygon = PackedVector2Array(-450, 68.3333, -446.167, 162.667, 194.833, 162.667, 211.833, 162.667, 208.167, -35.3333, 462.667, -31.5, 458.833, -131.5, 191.167, -129.667, 191.167, 66.5)
[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="Floors05Sprt/StaticBody2D"]
visible = false
build_mode = 1
polygon = PackedVector2Array(-448, -432.5, 458, -430.833, 456.667, 147.667, 529.5, 143.167, 526.167, 348.5, 452.167, 349.5, 456.167, 411, 104.751, 409.64, 97.6667, 474, -99.5, 470.333, -104.305, 408.83, -448, 407.5, -448.5, -154.333, -519.833, -163.833, -524.667, -363.5, -448, -365.152)
[node name="Door" type="Sprite2D" parent="Floors05Sprt"]
z_index = -1
position = Vector2(491.833, 269.333)
texture = SubResource("AtlasTexture_gnudx")
[node name="Door2" type="Sprite2D" parent="Floors05Sprt"]
z_index = -1
position = Vector2(-481.833, -238.667)
texture = SubResource("AtlasTexture_gnudx")
flip_h = true
[node name="Door4" type="Sprite2D" parent="Floors05Sprt"]
position = Vector2(14.3333, -456.333)
texture = SubResource("AtlasTexture_ex6vq")
flip_h = true
[node name="WoodenBridge" parent="Floors05Sprt" instance=ExtResource("4_okpsn")]
position = Vector2(325.833, -87.5)
scale = Vector2(0.95216, 0.95216)
metadata/Tags = ["bridge"]
[node name="Door3" parent="Floors05Sprt" instance=ExtResource("4_lwk0u")]
position = Vector2(-1.5, 455)
NextScene = "res://maps/map2.tscn"
Travel = 3
Spawn_Position = Vector2(333, -2652)
[node name="4010-aTinyStickerTaleReviewPic1" type="Sprite2D" parent="."]
visible = false
top_level = true
position = Vector2(78, -148)
scale = Vector2(6.15, 6.15)
[node name="Bush1" type="Sprite2D" parent="."]
position = Vector2(-2161, 1140)
scale = Vector2(3.80334, 3.95089)
texture = SubResource("AtlasTexture_2wdar")
centered = false
offset = Vector2(-161.055, -179.785)
metadata/tags = ["sticker"]
[node name="Area2D" type="Area2D" parent="Bush1"]
collision_layer = 2
collision_mask = 0
monitoring = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bush1/Area2D"]
position = Vector2(-4.46976, -71.6294)
rotation = 1.6
shape = SubResource("CapsuleShape2D_lfx7b")
[node name="Tree1" type="Sprite2D" parent="."]
position = Vector2(1592, 606)
scale = Vector2(3.80334, 3.95089)
centered = false
offset = Vector2(-251.145, -512)
metadata/tags = ["sticker"]
[node name="Area2D" type="Area2D" parent="Tree1"]
collision_layer = 2
collision_mask = 0
monitoring = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Tree1/Area2D"]
position = Vector2(0, -253.27)
rotation = 0.01
shape = SubResource("CapsuleShape2D_dqo8w")
[node name="Tree2" type="Sprite2D" parent="."]
position = Vector2(-2399, -55)
scale = Vector2(3.80334, 3.95089)
centered = false
offset = Vector2(-251.145, -512)
metadata/tags = ["sticker"]
[node name="Area2D" type="Area2D" parent="Tree2"]
collision_layer = 2
collision_mask = 0
monitoring = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Tree2/Area2D"]
position = Vector2(0, -253.27)
rotation = 0.01
shape = SubResource("CapsuleShape2D_dqo8w")
[node name="Tree3" type="Sprite2D" parent="."]
position = Vector2(-763, -2021)
scale = Vector2(3.80334, 3.95089)
centered = false
offset = Vector2(-251.145, -512)
metadata/tags = ["sticker"]
[node name="Area2D" type="Area2D" parent="Tree3"]
collision_layer = 2
collision_mask = 0
monitoring = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Tree3/Area2D"]
position = Vector2(0, -253.27)
rotation = 0.01
shape = SubResource("CapsuleShape2D_dqo8w")
[node name="Tree4" type="Sprite2D" parent="."]
position = Vector2(2365, -2258)
scale = Vector2(3.80334, 3.95089)
centered = false
offset = Vector2(-251.145, -512)
metadata/tags = ["sticker"]
[node name="Area2D" type="Area2D" parent="Tree4"]
collision_layer = 2
collision_mask = 0
monitoring = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Tree4/Area2D"]
position = Vector2(0, -253.27)
rotation = 0.01
shape = SubResource("CapsuleShape2D_dqo8w")
[node name="Bush6" type="Sprite2D" parent="."]
position = Vector2(-1556, 293)
scale = Vector2(3.80334, 3.95089)
texture = ExtResource("4_m2p3o")
centered = false
offset = Vector2(-161.055, -179.785)
metadata/tags = ["sticker"]
[node name="Sticker" type="Area2D" parent="Bush6" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 0
monitoring = false
script = ExtResource("8_c6p5e")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bush6/Sticker"]
position = Vector2(-4.46976, -71.6294)
rotation = 1.6
shape = SubResource("CapsuleShape2D_lfx7b")
[node name="Bush7" type="Sprite2D" parent="."]
position = Vector2(712, 293)
scale = Vector2(3.80334, 3.95089)
texture = SubResource("AtlasTexture_2wdar")
centered = false
offset = Vector2(-161.055, -179.785)
metadata/tags = ["sticker"]
[node name="Sticker" type="Area2D" parent="Bush7" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 0
monitoring = false
script = ExtResource("8_c6p5e")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bush7/Sticker"]
position = Vector2(-4.46976, -71.6294)
rotation = 1.6
shape = SubResource("CapsuleShape2D_lfx7b")
[node name="Bush9" type="Sprite2D" parent="."]
position = Vector2(1004, -2257)
scale = Vector2(3.80334, 3.95089)
texture = SubResource("AtlasTexture_2wdar")
centered = false
offset = Vector2(-161.055, -179.785)
metadata/tags = ["sticker"]
[node name="Area2D" type="Area2D" parent="Bush9"]
collision_layer = 2
collision_mask = 0
monitoring = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bush9/Area2D"]
position = Vector2(-4.46976, -71.6294)
rotation = 1.6
shape = SubResource("CapsuleShape2D_lfx7b")
[node name="Bush8" type="Sprite2D" parent="."]
position = Vector2(-1616, -1651)
scale = Vector2(3.80334, 3.95089)
texture = SubResource("AtlasTexture_2wdar")
centered = false
offset = Vector2(-137.285, -179.785)
flip_h = true
metadata/tags = ["sticker"]
[node name="Area2D" type="Area2D" parent="Bush8"]
collision_layer = 2
collision_mask = 0
monitoring = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bush8/Area2D"]
position = Vector2(-4.46976, -71.6294)
rotation = 1.6
shape = SubResource("CapsuleShape2D_lfx7b")
[node name="Bush10" type="Sprite2D" parent="."]
position = Vector2(-2063, -2116)
scale = Vector2(3.80334, 3.95089)
texture = SubResource("AtlasTexture_rn40i")
centered = false
offset = Vector2(-108.615, -141.38)
flip_h = true
metadata/tags = ["sticker"]
[node name="Area2D" type="Area2D" parent="Bush10"]
collision_layer = 2
collision_mask = 0
monitoring = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bush10/Area2D"]
position = Vector2(0, -48.95)
rotation = 1.5
shape = SubResource("CapsuleShape2D_b3366")
[node name="Bush11" type="Sprite2D" parent="."]
position = Vector2(2208, 2337)
scale = Vector2(5, 5.195)
texture = SubResource("AtlasTexture_rn40i")
centered = false
offset = Vector2(-108.615, -141.38)
metadata/tags = ["sticker"]
[node name="Area2D" type="Area2D" parent="Bush11"]
collision_layer = 2
collision_mask = 0
monitoring = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bush11/Area2D"]
position = Vector2(0, -48.95)
rotation = 1.5
shape = SubResource("CapsuleShape2D_b3366")
[node name="Rock1" type="Sprite2D" parent="."]
position = Vector2(-1807, 2030)
scale = Vector2(3.80334, 3.95089)
texture = SubResource("AtlasTexture_vun1v")
centered = false
offset = Vector2(-78.385, -130.2)
metadata/tags = ["rock"]
[node name="StaticBody2D" type="StaticBody2D" parent="Rock1"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Rock1/StaticBody2D"]
position = Vector2(7.915, -31.39)
shape = SubResource("RectangleShape2D_4cdlc")
debug_color = Color(0.996033, 0, 0.194446, 0.42)
[node name="Rock2" type="Sprite2D" parent="."]
position = Vector2(-2248, 1895)
scale = Vector2(3.80334, 3.95089)
texture = SubResource("AtlasTexture_wpoj4")
centered = false
offset = Vector2(-126.11, -220.56)
metadata/tags = ["rock"]
[node name="StaticBody2D" type="StaticBody2D" parent="Rock2"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Rock2/StaticBody2D"]
position = Vector2(0, -66.02)
shape = SubResource("RectangleShape2D_hk5e3")
debug_color = Color(0.996033, 0, 0.194446, 0.42)
[node name="Log" type="Sprite2D" parent="."]
position = Vector2(-1043, -170)
scale = Vector2(4, 4)
texture = SubResource("AtlasTexture_w86nr")
centered = false
offset = Vector2(-79.665, -133.81)
metadata/_edit_lock_ = true
[node name="StaticBody2D" type="StaticBody2D" parent="Log"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Log/StaticBody2D"]
position = Vector2(3.75, -17.5)
shape = SubResource("RectangleShape2D_tss3y")
debug_color = Color(0.999472, 0.00663362, 0.0810784, 0.42)
[node name="WoodBarrer" type="Sprite2D" parent="."]
position = Vector2(1246, 2431)
scale = Vector2(6.5, 6.5)
texture = SubResource("AtlasTexture_4j533")
centered = false
offset = Vector2(-96.815, -74.27)
metadata/_edit_lock_ = true
[node name="StaticBody2D" type="StaticBody2D" parent="WoodBarrer"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="WoodBarrer/StaticBody2D"]
position = Vector2(3.75, -17.5)
shape = SubResource("RectangleShape2D_tss3y")
debug_color = Color(0.999472, 0.00663362, 0.0810784, 0.42)
[node name="Log3" type="Sprite2D" parent="."]
position = Vector2(293, -810)
scale = Vector2(4, 4)
texture = SubResource("AtlasTexture_w86nr")
centered = false
offset = Vector2(-79.665, -133.81)
metadata/_edit_lock_ = true
[node name="StaticBody2D" type="StaticBody2D" parent="Log3"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Log3/StaticBody2D"]
position = Vector2(3.75, -17.5)
shape = SubResource("RectangleShape2D_tss3y")
debug_color = Color(0.999472, 0.00663362, 0.0810784, 0.42)
[node name="FirePit" type="Sprite2D" parent="."]
position = Vector2(-315, -588)
scale = Vector2(4, 4)
texture = ExtResource("10_2ugv3")
offset = Vector2(0, -26.64)
[node name="GPUParticles2D" type="GPUParticles2D" parent="FirePit"]
position = Vector2(1.25, -45.75)
scale = Vector2(0.5, 0.5)
amount = 4
process_material = SubResource("ParticleProcessMaterial_jw3i8")
texture = SubResource("AtlasTexture_c24s7")
lifetime = 2.0
collision_base_size = 0.0
visibility_rect = Rect2(-160, -160, 320, 320)
local_coords = true
[node name="StaticBody2D" type="StaticBody2D" parent="FirePit"]
position = Vector2(5.25, -32)
[node name="CollisionShape2D" type="CollisionShape2D" parent="FirePit/StaticBody2D"]
shape = SubResource("CircleShape2D_5wedp")
debug_color = Color(0.937527, 0.247798, 0.087146, 0.42)
[node name="PointLight2D" type="PointLight2D" parent="FirePit"]
position = Vector2(8.25, -43)
scale = Vector2(0.7, 0.7)
color = Color(1, 0.54902, 0.270588, 1)
energy = 1.2
shadow_enabled = true
texture = ExtResource("7_4swoj")
texture_scale = 1.9
[node name="Sticker" type="Area2D" parent="FirePit" node_paths=PackedStringArray("WorldSprite")]
position = Vector2(2.75, -32)
collision_layer = 2
collision_mask = 0
monitoring = false
script = ExtResource("8_c6p5e")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
[node name="CollisionShape2D" type="CollisionShape2D" parent="FirePit/Sticker"]
shape = SubResource("CircleShape2D_wkggp")
[connection signal="property_list_changed" from="Bush1" to="Bush1" method="_on_property_list_changed"]
[connection signal="property_list_changed" from="Tree1" to="Tree1" method="_on_property_list_changed"]
[connection signal="property_list_changed" from="Tree2" to="Tree2" method="_on_property_list_changed"]
[connection signal="property_list_changed" from="Tree3" to="Tree3" method="_on_property_list_changed"]
[connection signal="property_list_changed" from="Tree4" to="Tree4" method="_on_property_list_changed"]
[connection signal="property_list_changed" from="Bush6" to="Bush6" method="_on_property_list_changed"]
[connection signal="property_list_changed" from="Bush7" to="Bush7" method="_on_property_list_changed"]
[connection signal="property_list_changed" from="Bush9" to="Bush9" method="_on_property_list_changed"]
[connection signal="property_list_changed" from="Bush8" to="Bush8" method="_on_property_list_changed"]
[connection signal="property_list_changed" from="Bush10" to="Bush10" method="_on_property_list_changed"]
[connection signal="property_list_changed" from="Bush11" to="Bush11" method="_on_property_list_changed"]
[connection signal="property_list_changed" from="Rock1" to="Rock1" method="_on_property_list_changed"]
[connection signal="property_list_changed" from="Rock2" to="Rock2" method="_on_property_list_changed"]