From e37f5a0f7aa35931a3995de50c83654881b2e534 Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 11 Mar 2025 16:41:07 +0100 Subject: [PATCH] Alarm box rework --- Scenes/Interactable/alarm_box.tscn | 7 +++++-- Scenes/test.tscn | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Scenes/Interactable/alarm_box.tscn b/Scenes/Interactable/alarm_box.tscn index 05c18d10..cf31d637 100644 --- a/Scenes/Interactable/alarm_box.tscn +++ b/Scenes/Interactable/alarm_box.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=15 format=3 uid="uid://d1h48wgasakk4"] +[gd_scene load_steps=16 format=3 uid="uid://d1h48wgasakk4"] [ext_resource type="Script" uid="uid://d0a0o50j82eo6" path="res://Scripts/Activables/ScriptableBase.cs" id="1_2d4he"] [ext_resource type="Script" uid="uid://duhodrhcnoslh" path="res://Scripts/Interactables/Switch.cs" id="1_vly4n"] [ext_resource type="Texture2D" uid="uid://bpc66amnvvkrn" path="res://Sprites/AlarmBox.png" id="2_slydm"] [ext_resource type="Script" uid="uid://donxnd50p7dm8" path="res://Scripts/Resources/Events/AlarmDisableEvent.cs" id="2_umsjn"] +[ext_resource type="Script" uid="uid://b5fesrd4lv8t1" path="res://Scripts/Resources/Events/EventResource.cs" id="3_m2axc"] [ext_resource type="Script" uid="uid://daqdq17qiessy" path="res://Scripts/Components/AlarmSpriteSwitcher.cs" id="5_7g2v5"] [sub_resource type="Resource" id="Resource_hppa0"] @@ -68,12 +69,14 @@ animations = [{ }] [node name="AlarmBox" type="Area2D" node_paths=PackedStringArray("Targets") groups=["Interactable"]] +collision_layer = 4 +collision_mask = 2 script = ExtResource("1_vly4n") Targets = [NodePath("AlarmBox")] [node name="AlarmBox" type="Node2D" parent="." groups=["Interactable"]] script = ExtResource("1_2d4he") -Events = [SubResource("Resource_hppa0")] +Events = Array[ExtResource("3_m2axc")]([SubResource("Resource_hppa0")]) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("CircleShape2D_m2axc") diff --git a/Scenes/test.tscn b/Scenes/test.tscn index ad280587..14b6cff5 100644 --- a/Scenes/test.tscn +++ b/Scenes/test.tscn @@ -669,7 +669,7 @@ position = Vector2(-1078, -39) position = Vector2(-1506, -202) [node name="Fragola" parent="Factory Tilemaps/LevelProps" instance=ExtResource("4_s7wq6")] -position = Vector2(-743, -117) +position = Vector2(-858, -381) [node name="RedKeyCard" parent="Factory Tilemaps/LevelProps" instance=ExtResource("19_8fb73")] position = Vector2(-1159, 213)