Alert Signs

This commit is contained in:
MaddoScientisto 2025-02-16 16:26:05 +01:00
commit 5452b36f32
13 changed files with 226 additions and 22 deletions

View file

@ -0,0 +1,59 @@
[gd_scene load_steps=11 format=3 uid="uid://dnbtou2fklyvp"]
[ext_resource type="Script" path="res://Scripts/Activables/ScriptableBase.cs" id="1_kao8y"]
[ext_resource type="Script" path="res://Scripts/Resources/Events/AlarmDisableEvent.cs" id="2_8fwyu"]
[ext_resource type="PackedScene" uid="uid://crph24e6e0v0q" path="res://Scenes/Interactable/Control_Pad.tscn" id="3_eg1gw"]
[ext_resource type="Texture2D" uid="uid://bodoftbnvjh6i" path="res://Sprites/Actors/AlertSign.png" id="4_7ysp5"]
[ext_resource type="Script" path="res://Scripts/Components/AlarmSpriteSwitcher.cs" id="5_qohod"]
[sub_resource type="Resource" id="Resource_hppa0"]
script = ExtResource("2_8fwyu")
WaitForCompletion = true
[sub_resource type="AtlasTexture" id="AtlasTexture_adk1y"]
atlas = ExtResource("4_7ysp5")
region = Rect2(16, 0, 16, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_jdxjv"]
atlas = ExtResource("4_7ysp5")
region = Rect2(32, 0, 16, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_jkso3"]
atlas = ExtResource("4_7ysp5")
region = Rect2(0, 0, 16, 8)
[sub_resource type="SpriteFrames" id="SpriteFrames_25o7d"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_adk1y")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jdxjv")
}],
"loop": true,
"name": &"alarmed",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_jkso3")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[node name="AlarmBox" type="Node2D"]
script = ExtResource("1_kao8y")
Events = Array[Object]([SubResource("Resource_hppa0")])
[node name="ControlPad" parent="." node_paths=PackedStringArray("Target") instance=ExtResource("3_eg1gw")]
Target = NodePath("..")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_25o7d")
[node name="SpriteSwitcher" type="Node2D" parent="." node_paths=PackedStringArray("_sprite")]
script = ExtResource("5_qohod")
_sprite = NodePath("../AnimatedSprite2D")

View file

@ -1,9 +1,14 @@
[gd_scene load_steps=8 format=3 uid="uid://d1h48wgasakk4"]
[gd_scene load_steps=11 format=3 uid="uid://d1h48wgasakk4"]
[ext_resource type="Script" path="res://Scripts/Interactables/AlarmBox.cs" id="1_usvoy"]
[ext_resource type="Script" path="res://Scripts/Activables/ScriptableBase.cs" id="1_2d4he"]
[ext_resource type="PackedScene" uid="uid://crph24e6e0v0q" path="res://Scenes/Interactable/Control_Pad.tscn" id="2_2xddf"]
[ext_resource type="Texture2D" uid="uid://bpc66amnvvkrn" path="res://Sprites/AlarmBox.png" id="2_slydm"]
[ext_resource type="Script" path="res://Scripts/Resources/Events/AlarmDisableEvent.cs" id="2_umsjn"]
[ext_resource type="Script" path="res://Scripts/Components/AlarmSpriteSwitcher.cs" id="5_7g2v5"]
[sub_resource type="CircleShape2D" id="CircleShape2D_vvpve"]
[sub_resource type="Resource" id="Resource_hppa0"]
script = ExtResource("2_umsjn")
WaitForCompletion = true
[sub_resource type="AtlasTexture" id="AtlasTexture_uh6p2"]
atlas = ExtResource("2_slydm")
@ -39,15 +44,18 @@ animations = [{
"speed": 5.0
}]
[node name="AlarmBox" type="Area2D" groups=["Interactable"]]
collision_layer = 4
collision_mask = 2
script = ExtResource("1_usvoy")
[node name="AlarmBox" type="Node2D" groups=["Interactable"]]
script = ExtResource("1_2d4he")
Events = Array[Object]([SubResource("Resource_hppa0")])
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_vvpve")
[node name="ControlPad" parent="." node_paths=PackedStringArray("Target") instance=ExtResource("2_2xddf")]
Target = NodePath("..")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_kbgi5")
animation = &"alarmed"
frame_progress = 0.613245
[node name="SpriteSwitcher" type="Node2D" parent="." node_paths=PackedStringArray("_sprite")]
script = ExtResource("5_7g2v5")
_sprite = NodePath("../AnimatedSprite2D")

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=64 format=4 uid="uid://bv451a8wgty4u"]
[gd_scene load_steps=65 format=4 uid="uid://bv451a8wgty4u"]
[ext_resource type="Script" path="res://Scripts/GameManager.cs" id="1_8tmoj"]
[ext_resource type="PackedScene" uid="uid://bghghp5ep4w2j" path="res://Scenes/player.tscn" id="2_8mh54"]
@ -47,6 +47,7 @@
[ext_resource type="PackedScene" uid="uid://byjq8xpx4crfd" path="res://Scenes/Interactable/control_pad_blue_keycard.tscn" id="35_gdbcj"]
[ext_resource type="PackedScene" uid="uid://d0yes7huiyisw" path="res://Scenes/Items/Blue_Keycard.tscn" id="35_rblsn"]
[ext_resource type="PackedScene" uid="uid://r25rq6ijgm6m" path="res://Scenes/Items/Green_Keycard.tscn" id="36_f8fh1"]
[ext_resource type="PackedScene" uid="uid://dnbtou2fklyvp" path="res://Scenes/Actors/alarm_sign.tscn" id="36_rd6f6"]
[ext_resource type="Script" path="res://Scripts/Activables/ScriptableBase.cs" id="42_wigyb"]
[ext_resource type="PackedScene" uid="uid://fxvlaidieiv7" path="res://Scenes/Interactable/ScriptableAreaTrigger.tscn" id="43_kf3qc"]
[ext_resource type="Script" path="res://Scripts/Resources/Events/MovePlayerEvent.cs" id="44_klwgh"]
@ -275,9 +276,6 @@ Target = NodePath("../HorizontalDoor")
[node name="AlarmBox" parent="Factory Tilemaps" instance=ExtResource("17_dppcs")]
position = Vector2(-713, -153)
[node name="AlarmBox2" parent="Factory Tilemaps" instance=ExtResource("17_dppcs")]
position = Vector2(-616, -153)
[node name="Turret" parent="Factory Tilemaps" instance=ExtResource("18_6y85f")]
position = Vector2(-1076, 125)
@ -329,6 +327,24 @@ position = Vector2(-710, -459)
position = Vector2(-1515, -319)
Target = NodePath("../HorizontalDoor3")
[node name="AlarmBox2" parent="Factory Tilemaps" instance=ExtResource("36_rd6f6")]
position = Vector2(-714, -171)
[node name="AlarmBox3" parent="Factory Tilemaps" instance=ExtResource("36_rd6f6")]
position = Vector2(-888, 153)
[node name="AlarmBox4" parent="Factory Tilemaps" instance=ExtResource("36_rd6f6")]
position = Vector2(-1173, 119)
[node name="AlarmBox5" parent="Factory Tilemaps" instance=ExtResource("36_rd6f6")]
position = Vector2(-1081, -22)
[node name="AlarmBox6" parent="Factory Tilemaps" instance=ExtResource("36_rd6f6")]
position = Vector2(-1506, -202)
[node name="AlarmBox7" parent="Factory Tilemaps" instance=ExtResource("36_rd6f6")]
position = Vector2(-1019, 151)
[node name="CameraController" type="Camera2D" parent="."]
script = ExtResource("6_t8ide")
pixel_snap = false