Add sound effects to lever activation and enhance enemy movement detection
This commit is contained in:
@@ -51,7 +51,7 @@ hurt_fx = NodePath("../sfx_hurt")
|
||||
script = ExtResource("4_4eajk")
|
||||
area2d = NodePath("../Hitbox")
|
||||
|
||||
[node name="SideToSideMovement" type="Node" parent="." node_paths=PackedStringArray("root", "sprite2d", "left_ray", "right_ray")]
|
||||
[node name="SideToSideMovement" type="Node" parent="." node_paths=PackedStringArray("root", "sprite2d", "left_ray", "right_ray", "left_wall_ray", "right_wall_ray")]
|
||||
script = ExtResource("4_gbsq8")
|
||||
root = NodePath("..")
|
||||
sprite2d = NodePath("../Sprite2D")
|
||||
@@ -59,6 +59,8 @@ speed = 60.0
|
||||
wait_time = 0.5
|
||||
left_ray = NodePath("../Left Ray")
|
||||
right_ray = NodePath("../Right Ray")
|
||||
left_wall_ray = NodePath("../Left Wall Ray")
|
||||
right_wall_ray = NodePath("../Right Wall Ray")
|
||||
|
||||
[node name="PeriodicShootingComponent" type="Node" parent="." node_paths=PackedStringArray("side_to_side_movement", "root", "bullet_spawn_right", "bullet_spawn_left")]
|
||||
script = ExtResource("5_m03v0")
|
||||
@@ -87,10 +89,18 @@ debug_color = Color(0.913521, 0.265052, 0.323172, 0.42)
|
||||
position = Vector2(-16, 13)
|
||||
target_position = Vector2(0, 8)
|
||||
|
||||
[node name="Left Wall Ray" type="RayCast2D" parent="."]
|
||||
position = Vector2(-16, 0)
|
||||
target_position = Vector2(-8, 0)
|
||||
|
||||
[node name="Right Ray" type="RayCast2D" parent="."]
|
||||
position = Vector2(16, 13)
|
||||
target_position = Vector2(0, 8)
|
||||
|
||||
[node name="Right Wall Ray" type="RayCast2D" parent="."]
|
||||
position = Vector2(16, 0)
|
||||
target_position = Vector2(8, 0)
|
||||
|
||||
[node name="FlashingComponent" type="Node" parent="." node_paths=PackedStringArray("sprite", "health_component")]
|
||||
process_mode = 3
|
||||
script = ExtResource("7_xsaiy")
|
||||
|
@@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://bd51frym6mm7v"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://bd51frym6mm7v"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_psg62"]
|
||||
[ext_resource type="Script" path="res://scripts/components/lever_component.gd" id="2_0p0wb"]
|
||||
[ext_resource type="AudioStream" uid="uid://beq14we7v3iw4" path="res://sfx/activate_lever.wav" id="3_gipby"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ke5tv"]
|
||||
size = Vector2(12, 13)
|
||||
@@ -20,8 +21,12 @@ hframes = 12
|
||||
vframes = 12
|
||||
frame = 75
|
||||
|
||||
[node name="LeverComponent" type="Node" parent="." node_paths=PackedStringArray("area2d", "sprite2d")]
|
||||
[node name="LeverComponent" type="Node" parent="." node_paths=PackedStringArray("area2d", "sprite2d", "sfx")]
|
||||
script = ExtResource("2_0p0wb")
|
||||
area2d = NodePath("..")
|
||||
sprite2d = NodePath("../Sprite2D")
|
||||
start_animation_index = 75
|
||||
sfx = NodePath("../sfx")
|
||||
|
||||
[node name="sfx" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource("3_gipby")
|
||||
|
Reference in New Issue
Block a user