Files
CultManor/game/characters/abstract_enemy.tscn
T

74 lines
2.9 KiB
Plaintext

[gd_scene 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" unique_id=1676614852]
collision_layer = 0
script = ExtResource("1_2wrno")
[node name="AnimatedSprite2D" parent="." unique_id=1997264413 instance=ExtResource("2_tjvyk")]
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=185651284]
position = Vector2(0, 2)
shape = SubResource("CapsuleShape2D_mocsw")
[node name="PlayerKiller" parent="." unique_id=1874600747 instance=ExtResource("4_vecdo")]
[node name="WallCheck" type="Node2D" parent="." unique_id=782156094]
position = Vector2(0, 9)
[node name="LeftWallRay" type="RayCast2D" parent="WallCheck" unique_id=521416854]
unique_name_in_owner = true
target_position = Vector2(-16, 0)
[node name="RightWallRay" type="RayCast2D" parent="WallCheck" unique_id=1457669135]
unique_name_in_owner = true
target_position = Vector2(16, 0)
[node name="PlayerCloseCheck" type="Node2D" parent="." unique_id=1593775088]
position = Vector2(0, 9)
[node name="LeftPlayerCloseRay" type="RayCast2D" parent="PlayerCloseCheck" unique_id=947570027]
unique_name_in_owner = true
target_position = Vector2(-48, 0)
collision_mask = 0
[node name="RightPlayerCloseRay" type="RayCast2D" parent="PlayerCloseCheck" unique_id=1559118218]
unique_name_in_owner = true
target_position = Vector2(48, 0)
collision_mask = 0
[node name="PlayerDistantCheck" type="Node2D" parent="." unique_id=1597489123]
position = Vector2(0, 9)
[node name="LeftPlayerDistantRay" type="RayCast2D" parent="PlayerDistantCheck" unique_id=1491085518]
unique_name_in_owner = true
target_position = Vector2(-320, 0)
collision_mask = 0
[node name="RightPlayerDistantRay" type="RayCast2D" parent="PlayerDistantCheck" unique_id=1377654831]
unique_name_in_owner = true
target_position = Vector2(320, 0)
collision_mask = 0
[node name="PlayerTouchArea" type="Area2D" parent="." unique_id=2147163970]
collision_layer = 0
collision_mask = 0
[node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerTouchArea" unique_id=262478897]
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"]