Files
CultManor/game/characters/abstract_enemy.tscn
T
2026-01-11 16:56:37 +03:00

72 lines
2.4 KiB
Plaintext

[gd_scene load_steps=6 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="PackedScene" uid="uid://dtxiercm8dsfm" path="res://game/characters/enemy_sprite.tscn" id="2_tjvyk"]
[ext_resource type="PackedScene" uid="uid://dpvsvsd8pcjqn" path="res://game/player_killer.tscn" id="4_vecdo"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_mocsw"]
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")
[node name="AnimatedSprite2D" parent="." instance=ExtResource("2_tjvyk")]
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 2)
shape = SubResource("CapsuleShape2D_mocsw")
[node name="PlayerKiller" parent="." instance=ExtResource("4_vecdo")]
[node name="WallCheck" type="Node2D" parent="."]
position = Vector2(0, 9)
[node name="LeftWallRay" type="RayCast2D" parent="WallCheck"]
unique_name_in_owner = true
target_position = Vector2(-16, 0)
[node name="RightWallRay" type="RayCast2D" parent="WallCheck"]
unique_name_in_owner = true
target_position = Vector2(16, 0)
[node name="PlayerCloseCheck" type="Node2D" parent="."]
position = Vector2(0, 9)
[node name="LeftPlayerCloseRay" type="RayCast2D" parent="PlayerCloseCheck"]
unique_name_in_owner = true
target_position = Vector2(-48, 0)
collision_mask = 0
[node name="RightPlayerCloseRay" type="RayCast2D" parent="PlayerCloseCheck"]
unique_name_in_owner = true
target_position = Vector2(48, 0)
collision_mask = 0
[node name="PlayerDistantCheck" type="Node2D" parent="."]
position = Vector2(0, 9)
[node name="LeftPlayerDistantRay" type="RayCast2D" parent="PlayerDistantCheck"]
unique_name_in_owner = true
target_position = Vector2(-320, 0)
collision_mask = 0
[node name="RightPlayerDistantRay" type="RayCast2D" parent="PlayerDistantCheck"]
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="body_entered" from="PlayerTouchArea" to="." method="_on_player_touch_area_entered"]