Added menu sound

This commit is contained in:
2026-01-09 00:36:16 +03:00
parent bc0c494244
commit bd0dd5a9ec
36 changed files with 882 additions and 351 deletions
+6
View File
@@ -299,3 +299,9 @@ func _on_animation_looped() -> void:
if _state == State.Idle or (type == Type.Random and _is_walking_state()):
if randi_range(1, 100) <= LOOK_AROUND_CHANCE:
_state = State.LookAround
func _on_player_touch_area_entered(body: Node2D) -> void:
if body is Player:
_target_x = body.position.x
_set_chase_state()
+13 -1
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=46 format=3 uid="uid://bx0luh4vdob3q"]
[gd_scene load_steps=47 format=3 uid="uid://bx0luh4vdob3q"]
[ext_resource type="Script" uid="uid://but5aeh7y1s0f" path="res://game/characters/abstract_enemy.gd" id="1_2wrno"]
[ext_resource type="Texture2D" uid="uid://drk8j57acajrq" path="res://images/characters/cultist.png" id="2_mocsw"]
@@ -422,6 +422,9 @@ animations = [{
radius = 4.0
height = 28.0
[sub_resource type="RectangleShape2D" id="RectangleShape2D_vecdo"]
size = Vector2(32, 28)
[node name="AbstractEnemy" type="CharacterBody2D"]
collision_layer = 0
script = ExtResource("1_2wrno")
@@ -471,5 +474,14 @@ unique_name_in_owner = true
target_position = Vector2(320, 0)
collision_mask = 0
[node name="PlayerTouchArea" type="Area2D" parent="."]
collision_layer = 0
collision_mask = 0
[node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerTouchArea"]
position = Vector2(0, 2)
shape = SubResource("RectangleShape2D_vecdo")
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animation_finished"]
[connection signal="animation_looped" from="AnimatedSprite2D" to="." method="_on_animation_looped"]
[connection signal="body_entered" from="PlayerTouchArea" to="." method="_on_player_touch_area_entered"]
+6 -3
View File
@@ -34,14 +34,17 @@ collision_mask = 3
[node name="LeftPlayerCloseRay" parent="PlayerCloseCheck" index="0"]
target_position = Vector2(-32, 0)
collision_mask = 8
collision_mask = 11
[node name="RightPlayerCloseRay" parent="PlayerCloseCheck" index="1"]
target_position = Vector2(32, 0)
collision_mask = 8
collision_mask = 11
[node name="LeftPlayerDistantRay" parent="PlayerDistantCheck" index="0"]
collision_mask = 8
collision_mask = 11
[node name="RightPlayerDistantRay" parent="PlayerDistantCheck" index="1"]
collision_mask = 11
[node name="PlayerTouchArea" parent="." index="7"]
collision_mask = 8
+6 -3
View File
@@ -29,13 +29,16 @@ collision_mask = 35
collision_mask = 35
[node name="LeftPlayerCloseRay" parent="PlayerCloseCheck" index="0"]
collision_mask = 136
collision_mask = 171
[node name="RightPlayerCloseRay" parent="PlayerCloseCheck" index="1"]
collision_mask = 136
collision_mask = 171
[node name="LeftPlayerDistantRay" parent="PlayerDistantCheck" index="0"]
collision_mask = 136
collision_mask = 171
[node name="RightPlayerDistantRay" parent="PlayerDistantCheck" index="1"]
collision_mask = 171
[node name="PlayerTouchArea" parent="." index="6"]
collision_mask = 136
+6 -3
View File
@@ -31,14 +31,17 @@ collision_mask = 33
[node name="LeftPlayerCloseRay" parent="PlayerCloseCheck" index="0"]
target_position = Vector2(-32, 0)
collision_mask = 128
collision_mask = 161
[node name="RightPlayerCloseRay" parent="PlayerCloseCheck" index="1"]
target_position = Vector2(32, 0)
collision_mask = 128
collision_mask = 161
[node name="LeftPlayerDistantRay" parent="PlayerDistantCheck" index="0"]
collision_mask = 128
collision_mask = 161
[node name="RightPlayerDistantRay" parent="PlayerDistantCheck" index="1"]
collision_mask = 161
[node name="PlayerTouchArea" parent="." index="7"]
collision_mask = 128