wip: Sticker area and zone detection made separate (maybe optional)

This commit is contained in:
Lucas Peter 2024-08-02 17:26:19 +02:00
parent 32811969ea
commit 64284f5c58
No known key found for this signature in database
10 changed files with 141 additions and 132 deletions

View file

@ -1,40 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://clqvgh6qmglue"]
[sub_resource type="GDScript" id="GDScript_8d33s"]
resource_name = "bridge"
script/source = "extends Area2D
[ext_resource type="Script" path="res://core/bridgenode.tres.gd" id="1_tp7pv"]
var wallObjects : Array
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta):
pass
func _on_body_entered(object):
print(\"Entered %d\",object)
if (object.has_meta(\"Type\") and object.get_meta(\"Type\") == \"Player\" and wallObjects != null ):
for _object in wallObjects:
if (_object != null):
_object.process_mode = Node.PROCESS_MODE_DISABLED
else:
wallObjects.append(object)
func _on_body_exited(object):
if (object.has_meta(\"Type\") and object.get_meta(\"Type\") == \"Player\" and wallObjects != null ):
for _object in wallObjects:
if (_object != null):
_object.process_mode = Node.PROCESS_MODE_INHERIT
"
[node name="BridgeNode" type="Area2D"]
script = SubResource("GDScript_8d33s")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="body_exited" from="." to="." method="_on_body_exited"]
[node name="Bridge" type="Area2D"]
collision_layer = 4
collision_mask = 9
script = ExtResource("1_tp7pv")

31
core/bridgenode.tres.gd Normal file
View file

@ -0,0 +1,31 @@
@tool
class_name Bridge extends Area2D
## Disable the collisions when player enter
var wallObjects : Array
func _init():
collision_layer = 4
collision_mask = 25
# Called when the node enters the scene tree for the first time.
func _ready():
body_entered.connect(_on_body_entered)
body_exited.connect(_on_body_exited)
func _on_body_entered(object):
print("Entered %d",object)
if (object.has_meta("Type") and object.get_meta("Type") == "Player" and wallObjects != null ):
for _object in wallObjects:
if (_object != null):
_object.process_mode = Node.PROCESS_MODE_DISABLED
else:
wallObjects.append(object)
func _on_body_exited(object):
if (object.has_meta("Type") and object.get_meta("Type") == "Player" and wallObjects != null ):
for _object in wallObjects:
if (_object != null):
_object.process_mode = Node.PROCESS_MODE_INHERIT

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=24 format=3 uid="uid://0m1hk2nu4bps"]
[gd_scene load_steps=23 format=3 uid="uid://0m1hk2nu4bps"]
[ext_resource type="Script" path="res://core/player.gd" id="1_whhfc"]
[ext_resource type="Texture2D" uid="uid://5pmqr3y62guu" path="res://textures/player/currentCloth.tres" id="2_w1l4c"]
@ -499,11 +499,8 @@ node_connections = [&"output", 0, &"WalkRun"]
[sub_resource type="CanvasTexture" id="CanvasTexture_2b3h6"]
diffuse_texture = ExtResource("6_3ryww")
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_8drh2"]
radius = 130.0
height = 550.0
[node name="Player" type="CharacterBody2D"]
collision_mask = 17
motion_mode = 1
script = ExtResource("1_whhfc")
CurrentSkin = ExtResource("2_w1l4c")
@ -551,23 +548,25 @@ parameters/WalkRun/3/TimeScale/scale = 0.3
position = Vector2(17, 0)
[node name="BootL" type="Sprite2D" parent="Skeleton2D"]
position = Vector2(-93.6914, -35.1428)
rotation = 0.413206
position = Vector2(40.7995, -40.9482)
rotation = -0.517457
scale = Vector2(1, 1)
texture = ExtResource("2_w1l4c")
region_enabled = true
region_rect = Rect2(896, 768, 128, 128)
metadata/Type = "Skin"
[node name="BootR" type="Sprite2D" parent="Skeleton2D"]
position = Vector2(40.2865, -41.1666)
rotation = -0.671407
position = Vector2(-70.0154, -47.9395)
rotation = 0.481493
scale = Vector2(1, 1)
texture = ExtResource("2_w1l4c")
region_enabled = true
region_rect = Rect2(896, 768, 128, 128)
metadata/Type = "Skin"
[node name="Body" type="Sprite2D" parent="Skeleton2D"]
position = Vector2(51, -234.374)
position = Vector2(51, -242.313)
texture = ExtResource("2_w1l4c")
offset = Vector2(-15, 0)
region_enabled = true
@ -591,7 +590,7 @@ metadata/Type = "Skin"
[node name="Tail" type="Sprite2D" parent="Skeleton2D/Body"]
show_behind_parent = true
position = Vector2(44, 104.374)
position = Vector2(44, 112.313)
rotation = 0.153589
texture = ExtResource("2_w1l4c")
offset = Vector2(70, 0)
@ -600,8 +599,8 @@ region_rect = Rect2(768, 640, 256, 128)
metadata/Type = "Skin"
[node name="Head" type="Sprite2D" parent="Skeleton2D"]
position = Vector2(-40, -407.374)
rotation = 0.0767937
position = Vector2(-40, -415.313)
rotation = 0.000647508
scale = Vector2(1, 1)
texture = ExtResource("2_w1l4c")
offset = Vector2(0, -168)
@ -690,9 +689,3 @@ z_index = -1
position = Vector2(42, -381)
scale = Vector2(1.89731, 1.89731)
texture = SubResource("CanvasTexture_2b3h6")
[node name="DetectionArea" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="DetectionArea"]
position = Vector2(0, -266.265)
shape = SubResource("CapsuleShape2D_8drh2")

View file

@ -10,6 +10,13 @@ extends Node2D
#@onready var scene_transition = $ScreenTransition/AnimationPlayer
var player:Object
func scene_clean(scene):
if (scene != null and scene.get_child_count() > 0):
scene.get_child(0).queue_free()
func _init():
scene_clean(current_scene)
scene_clean(next_scene)
func _process(_delta):
if($CurrentScene.get_child_count() >0):
@ -67,7 +74,6 @@ func _on_animation_player_animation_finished(anim_name):
current_scene.position = Vector2(0,0)
if (next_scene.get_child_count() > 0):
next_scene.get_child(0).reparent(current_scene)
if (next_scene.get_child_count() > 0):
next_scene.get_child(0).queue_free()
scene_clean(next_scene)
print("level unloaded")
await get_tree().create_timer(1).connect("timeout",Callable(self,"on_travel_end"))

View file

@ -28,7 +28,7 @@ class_name Sticker extends Area2D
var meta:PackedStringArray = ["sticker"]
var detected_solids:Array
var detected_stickers:Array
var detected_zone:Array
#region Functions
@ -36,7 +36,8 @@ var detected_stickers:Array
func _init():
collision_layer = 2
collision_mask = 15
# TODO: Stickerzone maybe will not need to check everything, and detection will be on the zone detection area only. maybe we want a fallback if sticker area and detection area are the same shape
collision_mask = 61
set_meta("tags",meta)
monitoring = true
@ -55,6 +56,8 @@ func _ready():
area_entered.connect(_on_area_entered)
area_exited.connect(_on_area_exited)
# TODO : Solids and interactive zone detection area should not be the same as the sticker area.
# IDEA: Need to export a child Area2D
func _on_body_entered(body:Node2D):
print("body entered",body)
detected_solids.append(body)
@ -64,10 +67,10 @@ func _on_body_exited(body:Node2D):
func _on_area_entered(area:Area2D):
print("area entered",area)
#TODO:Filter by type
detected_stickers.append(area)
detected_zone.append(area)
func _on_area_exited(area:Area2D):
print("area exited",area)
detected_stickers.erase(area)
detected_zone.erase(area)
func _process(delta):
pass
@ -81,6 +84,7 @@ func on_released(CastResult:Array=[]):
disable_ChildNodes_collisions(false)
update_ChildNodes_visibilty(true)
Sticker_mode = false
on_unhover() #security
get_parent().reparent(MapManager.current_scene.get_child(0))

View file

@ -73,7 +73,7 @@ radius = 72.88
z_as_relative = false
y_sort_enabled = true
[node name="Floors05Sprt" type="Sprite2D" parent="."]
[node name="Floor" type="Sprite2D" parent="."]
z_index = -10
z_as_relative = false
scale = Vector2(6, 6)
@ -81,51 +81,52 @@ texture = ExtResource("1_pt5vq")
region_rect = Rect2(0, 0, 1024, 992)
metadata/_edit_lock_ = true
[node name="StaticBody2D" type="StaticBody2D" parent="Floors05Sprt"]
[node name="StaticBody2D" type="StaticBody2D" parent="Floor"]
collision_layer = 16
metadata/_edit_lock_ = true
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Floors05Sprt/StaticBody2D"]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Floor/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"]
[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="Floor/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"]
[node name="Door" type="Sprite2D" parent="Floor"]
z_index = -1
position = Vector2(491.833, 269.333)
texture = ExtResource("2_0jvyl")
script = ExtResource("3_384sx")
Travel = 1
[node name="Area2D" type="Area2D" parent="Floors05Sprt/Door"]
[node name="Area2D" type="Area2D" parent="Floor/Door"]
input_pickable = false
monitorable = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Floors05Sprt/Door/Area2D"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Floor/Door/Area2D"]
position = Vector2(5.32, -22.732)
rotation = -1.5708
shape = SubResource("RectangleShape2D_yeof8")
[node name="Door2" type="Sprite2D" parent="Floors05Sprt"]
[node name="Door2" type="Sprite2D" parent="Floor"]
z_index = -1
position = Vector2(-481.833, -238.667)
texture = ExtResource("2_0jvyl")
flip_h = true
[node name="Door4" type="Sprite2D" parent="Floors05Sprt"]
[node name="Door4" type="Sprite2D" parent="Floor"]
position = Vector2(14.3333, -456.333)
texture = ExtResource("4_f0vha")
flip_h = true
[node name="WoodenBridge" parent="Floors05Sprt" instance=ExtResource("4_okpsn")]
[node name="WoodenBridge" parent="Floor" instance=ExtResource("4_okpsn")]
position = Vector2(325.833, -87.5)
scale = Vector2(0.95216, 0.95216)
texture = ExtResource("3_k46hy")
metadata/Tags = ["bridge"]
[node name="Door3" parent="Floors05Sprt" instance=ExtResource("4_lwk0u")]
[node name="Door3" parent="Floor" instance=ExtResource("4_lwk0u")]
position = Vector2(-1.5, 455)
NextScene = "res://maps/map2.tscn"
Travel = 3
@ -147,7 +148,7 @@ metadata/tags = ["sticker"]
[node name="Sticker" type="Area2D" parent="Bush1" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 15
collision_mask = 29
script = ExtResource("5_ek34p")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
@ -167,7 +168,7 @@ metadata/tags = ["sticker"]
[node name="Sticker" type="Area2D" parent="Tree2" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 15
collision_mask = 29
script = ExtResource("5_ek34p")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
@ -187,7 +188,7 @@ metadata/tags = ["sticker"]
[node name="Sticker" type="Area2D" parent="Tree5" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 15
collision_mask = 29
script = ExtResource("5_ek34p")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
@ -207,7 +208,7 @@ metadata/tags = ["sticker"]
[node name="Sticker" type="Area2D" parent="Tree6" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 15
collision_mask = 29
script = ExtResource("5_ek34p")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
@ -228,7 +229,7 @@ metadata/tags = ["sticker"]
[node name="Sticker" type="Area2D" parent="Tree4" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 15
collision_mask = 29
script = ExtResource("5_ek34p")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
@ -248,7 +249,7 @@ metadata/tags = ["sticker"]
[node name="Sticker" type="Area2D" parent="Bush6" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 15
collision_mask = 29
script = ExtResource("5_ek34p")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
@ -268,7 +269,7 @@ metadata/tags = ["sticker"]
[node name="Sticker" type="Area2D" parent="Bush7" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 15
collision_mask = 29
script = ExtResource("5_ek34p")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
@ -288,7 +289,7 @@ metadata/tags = ["sticker"]
[node name="Sticker" type="Area2D" parent="Bush11" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 15
collision_mask = 29
script = ExtResource("5_ek34p")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
@ -309,7 +310,7 @@ metadata/tags = ["sticker"]
[node name="Sticker" type="Area2D" parent="Bush9" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 15
collision_mask = 29
script = ExtResource("5_ek34p")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
@ -330,7 +331,7 @@ metadata/tags = ["sticker"]
[node name="Sticker" type="Area2D" parent="Bush8" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 15
collision_mask = 29
script = ExtResource("5_ek34p")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
@ -344,14 +345,13 @@ shape = SubResource("CapsuleShape2D_lfx7b")
position = Vector2(-2063, -2116)
scale = Vector2(3.80334, 3.95089)
texture = ExtResource("11_dibxq")
centered = false
offset = Vector2(-108.615, -141.38)
offset = Vector2(0, -63.525)
flip_h = true
metadata/tags = ["sticker"]
[node name="Sticker" type="Area2D" parent="Bush10" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 15
collision_mask = 29
script = ExtResource("5_ek34p")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
@ -408,7 +408,7 @@ debug_color = Color(0.999472, 0.00663362, 0.0810784, 0.42)
[node name="Sticker" type="Area2D" parent="Log" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 15
collision_mask = 29
script = ExtResource("5_ek34p")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
@ -449,7 +449,7 @@ debug_color = Color(0.999472, 0.00663362, 0.0810784, 0.42)
[node name="Sticker" type="Area2D" parent="Log3" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 15
collision_mask = 29
script = ExtResource("5_ek34p")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
@ -501,7 +501,7 @@ metadata/_edit_lock_ = true
position = Vector2(11, -128)
scale = Vector2(4, 4)
collision_layer = 2
collision_mask = 15
collision_mask = 29
script = ExtResource("5_ek34p")
WorldSprite = NodePath("../FirePitSprite")
StickerSprite = NodePath("../FirePitSticker")

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=21 format=3 uid="uid://5tfe84u3gyty"]
[gd_scene load_steps=22 format=3 uid="uid://5tfe84u3gyty"]
[ext_resource type="Texture2D" uid="uid://bnmlngwnibfnj" path="res://extracted/ref_map2.jpg" id="1_cdv75"]
[ext_resource type="Texture2D" uid="uid://cypb81fuw4w44" path="res://textures/atlas/GroundExtensions_All_01_SPRT.png" id="3_54rqc"]
@ -8,6 +8,7 @@
[ext_resource type="Texture2D" uid="uid://dggavne4ueche" path="res://textures/sprites/Tree_Field_01_SPRT.png" id="5_lwnej"]
[ext_resource type="Texture2D" uid="uid://chuv25pm2vqen" path="res://textures/atlas/Rocks_All_01_SPRT.png" id="7_pykf8"]
[ext_resource type="Texture2D" uid="uid://b366mcexlko72" path="res://textures/atlas/LogsAndWood_All_01_SPRT.png" id="8_ugxkt"]
[ext_resource type="Script" path="res://core/stickernode.gd" id="9_ap7ts"]
[sub_resource type="AtlasTexture" id="AtlasTexture_rckkj"]
atlas = ExtResource("3_54rqc")
@ -33,12 +34,12 @@ size = Vector2(133.06, 62.73)
atlas = ExtResource("8_ugxkt")
region = Rect2(1600, 944, 104, 176)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_djose"]
size = Vector2(154.335, 84.705)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_enbs7"]
size = Vector2(65.54, 94.235)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_djose"]
size = Vector2(154.335, 84.705)
[sub_resource type="AtlasTexture" id="AtlasTexture_ddtk8"]
atlas = ExtResource("7_pykf8")
region = Rect2(1440, 1376, 256, 256)
@ -57,40 +58,35 @@ size = Vector2(325.915, 124.47)
z_as_relative = false
y_sort_enabled = true
[node name="Map2" type="Sprite2D" parent="."]
[node name="Floor" type="Sprite2D" parent="."]
z_index = -10
scale = Vector2(5.44506, 5.44506)
texture = ExtResource("3_gbt28")
metadata/_edit_lock_ = true
[node name="StaticBody2D" type="StaticBody2D" parent="Map2"]
[node name="StaticBody2D" type="StaticBody2D" parent="Floor"]
[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="Map2/StaticBody2D"]
visible = false
[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="Floor/StaticBody2D"]
position = Vector2(5.32593, -60.2381)
build_mode = 1
polygon = PackedVector2Array(-448, -432.5, -29.5759, -431.73, -29.5681, -475.661, 128.557, -481.354, 134.066, -431.429, 458, -430.833, 456.928, 275.846, 138.841, 274.193, 142.514, 319.372, 134.415, 336.571, -270.153, 338.472, -270.153, 270.888, -447.378, 269.786, -444.694, 85.548, -509.269, 86.1331, -512.758, -74.563, -445.734, -77.3378)
polygon = PackedVector2Array(-448, -432.5, -29.5759, -431.73, -29.5681, -475.661, 128.557, -481.354, 134.066, -431.429, 458, -430.833, 451.235, 453.255, -443.154, 454.357, -444.694, 85.548, -509.269, 86.1331, -512.758, -74.563, -445.734, -77.3378)
[node name="Dock" type="Sprite2D" parent="Map2"]
[node name="Dock" type="Sprite2D" parent="Floor"]
position = Vector2(-80.2562, 4.59132)
texture = SubResource("AtlasTexture_rckkj")
[node name="StaticBody2D" type="StaticBody2D" parent="Map2/Dock"]
[node name="StaticBody2D" type="StaticBody2D" parent="Floor/Dock"]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Map2/Dock/StaticBody2D"]
position = Vector2(-4.95862, -0.550958)
polygon = PackedVector2Array(-183.469, 112.763, -180.347, 275.112, -175.205, 275.479, -177.592, 112.212)
[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="Floor/Dock/StaticBody2D"]
polygon = PackedVector2Array(-27.3642, 105.6, -27.9152, 135.719, 220.751, 132.965, 225.158, 140.494, 224.791, 257.481, 219.465, 271.071, -183.653, 270.52, -186.926, 119.417, -187.142, 109.457, -181.082, 109.824, -178.143, 264.46, 217.628, 264.46, 218.179, 139.943, -31.221, 141.78, -31.7719, 105.049)
[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="Map2/Dock/StaticBody2D"]
polygon = PackedVector2Array(-27.3642, 105.6, -27.9152, 135.719, 217.628, 133.883, 223.505, 140.311, 224.791, 257.481, 230.668, 257.481, 227.362, 128.557, -24.9768, 130.577)
[node name="Door1" type="Sprite2D" parent="Map2"]
[node name="Door1" type="Sprite2D" parent="Floor"]
position = Vector2(-472.171, -51.0555)
scale = Vector2(0.74059, 0.74059)
texture = SubResource("AtlasTexture_7lxfk")
flip_h = true
[node name="Door" parent="Map2" instance=ExtResource("4_yvr3q")]
[node name="Door" parent="Floor" instance=ExtResource("4_yvr3q")]
position = Vector2(67.4006, -511.656)
scale = Vector2(0.869617, 0.869617)
texture = SubResource("AtlasTexture_a0jcl")
@ -153,16 +149,6 @@ centered = false
offset = Vector2(-52.525, -167.375)
metadata/tags = ["sticker"]
[node name="Area2D" type="Area2D" parent="Box1"]
collision_layer = 2
collision_mask = 0
monitoring = false
[node name="StickerShape2D" type="CollisionShape2D" parent="Box1/Area2D"]
position = Vector2(0, -76.12)
rotation = 1.5708
shape = SubResource("RectangleShape2D_djose")
[node name="StaticBody2D" type="StaticBody2D" parent="Box1"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Box1/StaticBody2D"]
@ -170,6 +156,18 @@ position = Vector2(0, -49.595)
shape = SubResource("RectangleShape2D_enbs7")
debug_color = Color(0.996033, 0, 0.194446, 0.42)
[node name="Sticker" type="Area2D" parent="Box1" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 15
script = ExtResource("9_ap7ts")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
[node name="StickerShape2D" type="CollisionShape2D" parent="Box1/Sticker"]
position = Vector2(0, -76.12)
rotation = 1.5708
shape = SubResource("RectangleShape2D_djose")
[node name="Box2" type="Sprite2D" parent="."]
position = Vector2(1437, -1275.32)
scale = Vector2(5, 4.51)
@ -178,16 +176,6 @@ centered = false
offset = Vector2(-54.04, -167.375)
metadata/tags = ["sticker"]
[node name="Area2D" type="Area2D" parent="Box2"]
collision_layer = 2
collision_mask = 0
monitoring = false
[node name="StickerShape2D" type="CollisionShape2D" parent="Box2/Area2D"]
position = Vector2(0, -76.12)
rotation = 1.5708
shape = SubResource("RectangleShape2D_djose")
[node name="StaticBody2D" type="StaticBody2D" parent="Box2"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Box2/StaticBody2D"]
@ -195,6 +183,18 @@ position = Vector2(0, -49.595)
shape = SubResource("RectangleShape2D_enbs7")
debug_color = Color(0.996033, 0, 0.194446, 0.42)
[node name="Sticker" type="Area2D" parent="Box2" node_paths=PackedStringArray("WorldSprite")]
collision_layer = 2
collision_mask = 15
script = ExtResource("9_ap7ts")
WorldSprite = NodePath("..")
metadata/tags = PackedStringArray("sticker")
[node name="StickerShape2D" type="CollisionShape2D" parent="Box2/Sticker"]
position = Vector2(0, -76.12)
rotation = 1.5708
shape = SubResource("RectangleShape2D_djose")
[node name="Rock2" type="Sprite2D" parent="."]
position = Vector2(1776, -705.32)
scale = Vector2(5, 5.195)

View file

@ -219,12 +219,19 @@ libraries = {
}
[node name="Camera2D" type="Camera2D" parent="."]
zoom = Vector2(0.13, 0.13)
zoom = Vector2(0.09, 0.09)
[node name="Background" parent="Camera2D" instance=ExtResource("4_81gsq")]
Pattern = ExtResource("5_pl2si")
PatternColor = Color(1, 1, 1, 0.490196)
BGColor = Color(0.173374, 0.319037, 0.221103, 1)
[node name="OutOfBound" type="StaticBody2D" parent="."]
collision_layer = 32
collision_mask = 2
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="OutOfBound"]
polygon = PackedVector2Array(-2668, -2600, -2718, 2494, 2770, 2483, 2761, -2635, -6608, -2575, -6572, -3893, 6824, -4044, 6590, 3810, -6903, 3843, -6608, -2579)
[connection signal="ready" from="." to="." method="_on_ready"]
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_player_animation_finished"]

View file

@ -11,7 +11,6 @@ texture = SubResource("AtlasTexture_nkyhf")
[node name="BridgeNode" parent="." instance=ExtResource("2_te8ug")]
position = Vector2(1788, 788)
collision_layer = 2
[node name="PlayerDetection" type="CollisionPolygon2D" parent="BridgeNode"]
position = Vector2(-623.92, 0)
@ -19,8 +18,7 @@ scale = Vector2(0.650499, 1)
polygon = PackedVector2Array(-1875.9, -847.689, -1878.05, -681.225, -1699.64, -682.976, -1706.37, -847.689)
[node name="StaticBody2D" type="StaticBody2D" parent="."]
collision_layer = 3
input_pickable = true
collision_layer = 16
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="StaticBody2D"]
polygon = PackedVector2Array(-84.7196, -115.177, -83.3193, 112.026, -58.9886, 111.851, -59.1637, -113.951)

View file

@ -124,6 +124,8 @@ mouse_right={
2d_physics/layer_2="Stickers"
2d_physics/layer_3="Zone"
2d_physics/layer_4="PNJ"
2d_physics/layer_5="Wall"
2d_physics/layer_6="OutOfBound"
[rendering]