Files
CultManor/game/characters/enemies/cultist.tscn
T
2026-06-20 21:58:27 +03:00

185 lines
9.4 KiB
Plaintext

[gd_scene format=3 uid="uid://bx0luh4vdob3q"]
[ext_resource type="Script" uid="uid://but5aeh7y1s0f" path="res://game/characters/enemies/cultist.gd" id="1_ah13v"]
[ext_resource type="PackedScene" uid="uid://8yd8f5x1hujv" path="res://game/characters/water_splash.tscn" id="2_go1hq"]
[ext_resource type="PackedScene" uid="uid://dtxiercm8dsfm" path="res://game/characters/enemies/cultist_sprite.tscn" id="3_mbt3t"]
[ext_resource type="Shader" uid="uid://lqq1mg6l1qqe" path="res://game/shaders/black_n_white.gdshader" id="4_ul6ar"]
[ext_resource type="PackedScene" uid="uid://dike8xgbqdut2" path="res://game/killing_area.tscn" id="5_500rx"]
[ext_resource type="PackedScene" uid="uid://bg7k6ovbk1xgm" path="res://game/characters/enemies/state_machine/cultist_state_machine.tscn" id="6_oqd45"]
[ext_resource type="PackedScene" uid="uid://bq1v55jv4c6qe" path="res://game/characters/enemies/state_machine/cultist_state.tscn" id="7_nsxyj"]
[ext_resource type="Script" uid="uid://bqnq6m0s4etqh" path="res://game/characters/enemies/state_machine/fall_state.gd" id="8_h77eg"]
[ext_resource type="Script" uid="uid://b8o0lvuy6a5q1" path="res://game/characters/enemies/state_machine/fall_left_state.gd" id="9_uasba"]
[ext_resource type="Script" uid="uid://cxg54u14yb6go" path="res://game/characters/enemies/state_machine/fall_right_state.gd" id="10_mye2w"]
[ext_resource type="Script" uid="uid://bfp8gywqqkju7" path="res://game/characters/enemies/state_machine/look_around_state.gd" id="11_rqqg0"]
[ext_resource type="Script" uid="uid://hgn4yll571hp" path="res://game/characters/enemies/state_machine/walk_left_state.gd" id="12_vm7uu"]
[ext_resource type="Script" uid="uid://bwwhmjxhg2adp" path="res://game/characters/enemies/state_machine/walk_right_state.gd" id="13_x8b3k"]
[ext_resource type="Script" uid="uid://cn2lfl4kuxvjk" path="res://game/characters/enemies/state_machine/chase_left_state.gd" id="14_d5aal"]
[ext_resource type="Script" uid="uid://3kl84tu1vwiv" path="res://game/characters/enemies/state_machine/chase_right_state.gd" id="15_1yxn0"]
[ext_resource type="Script" uid="uid://cqlym4lqahsd3" path="res://game/characters/enemies/state_machine/cultist_jump_left_state.gd" id="16_11eub"]
[ext_resource type="Script" uid="uid://cf52bjcpasft1" path="res://game/characters/enemies/state_machine/cultist_jump_right_state.gd" id="17_6hjcx"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ah13v"]
resource_local_to_scene = true
shader = ExtResource("4_ul6ar")
shader_parameter/black_color = Color(0, 0, 0, 1)
shader_parameter/white_color = Color(1, 1, 1, 1)
shader_parameter/switch_colors = false
shader_parameter/threshold = 0.5
shader_parameter/speed = 3.0
shader_parameter/intensity = 1.0
shader_parameter/scale = 5.0
shader_parameter/seed = 0.0
shader_parameter/direction = Vector2(0, 1)
shader_parameter/use_world_pos = false
[sub_resource type="ViewportTexture" id="ViewportTexture_go1hq"]
viewport_path = NodePath("SubViewport")
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_mocsw"]
radius = 4.0
height = 28.0
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_tjvyk"]
radius = 4.0
height = 28.0
[node name="Cultist" type="CharacterBody2D" unique_id=1676614852]
collision_layer = 64
collision_mask = 33
script = ExtResource("1_ah13v")
[node name="WaterSplash" parent="." unique_id=658940825 instance=ExtResource("2_go1hq")]
position = Vector2(0, -14)
[node name="CultistSprite" parent="." unique_id=1997264413 instance=ExtResource("3_mbt3t")]
material = SubResource("ShaderMaterial_ah13v")
position = Vector2(0, 1)
texture = SubResource("ViewportTexture_go1hq")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=185651284]
position = Vector2(0, 2)
shape = SubResource("CapsuleShape2D_mocsw")
[node name="WallCheckHigh" type="Node2D" parent="." unique_id=1697845810]
position = Vector2(0, -8)
[node name="LeftWallRay" type="RayCast2D" parent="WallCheckHigh" unique_id=1026693538]
target_position = Vector2(-16, 0)
collision_mask = 33
[node name="RightWallRay" type="RayCast2D" parent="WallCheckHigh" unique_id=1129233918]
target_position = Vector2(16, 0)
collision_mask = 33
[node name="WallCheckLow" type="Node2D" parent="." unique_id=782156094]
position = Vector2(0, 9)
[node name="LeftWallRay" type="RayCast2D" parent="WallCheckLow" unique_id=521416854]
target_position = Vector2(-16, 0)
collision_mask = 33
[node name="RightWallRay" type="RayCast2D" parent="WallCheckLow" unique_id=1457669135]
target_position = Vector2(16, 0)
collision_mask = 33
[node name="PlayerCloseCheck" type="Node2D" parent="." unique_id=1593775088]
position = Vector2(0, -8)
[node name="LeftPlayerCloseRay" type="RayCast2D" parent="PlayerCloseCheck" unique_id=947570027]
unique_name_in_owner = true
target_position = Vector2(-48, 0)
collision_mask = 161
[node name="RightPlayerCloseRay" type="RayCast2D" parent="PlayerCloseCheck" unique_id=1559118218]
unique_name_in_owner = true
target_position = Vector2(48, 0)
collision_mask = 161
[node name="PlayerDistantCheck" type="Node2D" parent="." unique_id=1597489123]
position = Vector2(0, -8)
[node name="LeftPlayerDistantRay" type="RayCast2D" parent="PlayerDistantCheck" unique_id=1491085518]
unique_name_in_owner = true
target_position = Vector2(-320, 0)
collision_mask = 161
[node name="RightPlayerDistantRay" type="RayCast2D" parent="PlayerDistantCheck" unique_id=1377654831]
unique_name_in_owner = true
target_position = Vector2(320, 0)
collision_mask = 161
[node name="KillingArea" parent="." unique_id=1891922549 instance=ExtResource("5_500rx")]
collision_mask = 128
[node name="CollisionShape2D" type="CollisionShape2D" parent="KillingArea" unique_id=1710758452]
position = Vector2(0, 2)
shape = SubResource("CapsuleShape2D_tjvyk")
[node name="CultistStateMachine" parent="." unique_id=633169960 node_paths=PackedStringArray("cultist", "initial_state") instance=ExtResource("6_oqd45")]
cultist = NodePath("..")
initial_state = NodePath("LookAroundState")
[node name="FallState" parent="CultistStateMachine" unique_id=1764777802 node_paths=PackedStringArray("look_around_state", "cultist") instance=ExtResource("7_nsxyj")]
script = ExtResource("8_h77eg")
look_around_state = NodePath("../LookAroundState")
cultist = NodePath("../..")
[node name="FallLeftState" parent="CultistStateMachine" unique_id=1011952297 node_paths=PackedStringArray("fall_state", "look_around_state", "cultist") instance=ExtResource("7_nsxyj")]
script = ExtResource("9_uasba")
fall_state = NodePath("../FallState")
look_around_state = NodePath("../LookAroundState")
cultist = NodePath("../..")
[node name="FallRightState" parent="CultistStateMachine" unique_id=1932915544 node_paths=PackedStringArray("fall_state", "look_around_state", "cultist") instance=ExtResource("7_nsxyj")]
script = ExtResource("10_mye2w")
fall_state = NodePath("../FallState")
look_around_state = NodePath("../LookAroundState")
cultist = NodePath("../..")
[node name="LookAroundState" parent="CultistStateMachine" unique_id=2025927882 node_paths=PackedStringArray("fall_state", "walk_left_state", "walk_right_state", "chase_left_state", "chase_right_state", "cultist") instance=ExtResource("7_nsxyj")]
script = ExtResource("11_rqqg0")
fall_state = NodePath("../FallState")
walk_left_state = NodePath("../WalkLeftState")
walk_right_state = NodePath("../WalkRightState")
chase_left_state = NodePath("../ChaseLeftState")
chase_right_state = NodePath("../ChaseRightState")
cultist = NodePath("../..")
[node name="WalkLeftState" parent="CultistStateMachine" unique_id=276543931 node_paths=PackedStringArray("chase_state", "another_direction_walk_state", "fall_state", "cultist") instance=ExtResource("7_nsxyj")]
script = ExtResource("12_vm7uu")
chase_state = NodePath("../ChaseLeftState")
another_direction_walk_state = NodePath("../WalkRightState")
fall_state = NodePath("../FallLeftState")
cultist = NodePath("../..")
[node name="WalkRightState" parent="CultistStateMachine" unique_id=1671686910 node_paths=PackedStringArray("chase_state", "another_direction_walk_state", "fall_state", "cultist") instance=ExtResource("7_nsxyj")]
script = ExtResource("13_x8b3k")
chase_state = NodePath("../ChaseRightState")
another_direction_walk_state = NodePath("../WalkLeftState")
fall_state = NodePath("../FallRightState")
cultist = NodePath("../..")
[node name="ChaseLeftState" parent="CultistStateMachine" unique_id=209480830 node_paths=PackedStringArray("look_around_state", "jump_state", "fall_state", "cultist") instance=ExtResource("7_nsxyj")]
script = ExtResource("14_d5aal")
look_around_state = NodePath("../LookAroundState")
jump_state = NodePath("../JumpLeftState")
fall_state = NodePath("../FallState")
cultist = NodePath("../..")
[node name="ChaseRightState" parent="CultistStateMachine" unique_id=383038915 node_paths=PackedStringArray("look_around_state", "jump_state", "fall_state", "cultist") instance=ExtResource("7_nsxyj")]
script = ExtResource("15_1yxn0")
look_around_state = NodePath("../LookAroundState")
jump_state = NodePath("../JumpRightState")
fall_state = NodePath("../FallState")
cultist = NodePath("../..")
[node name="JumpLeftState" parent="CultistStateMachine" unique_id=739226464 node_paths=PackedStringArray("chase_state", "cultist") instance=ExtResource("7_nsxyj")]
script = ExtResource("16_11eub")
chase_state = NodePath("../ChaseLeftState")
cultist = NodePath("../..")
[node name="JumpRightState" parent="CultistStateMachine" unique_id=756126836 node_paths=PackedStringArray("chase_state", "cultist") instance=ExtResource("7_nsxyj")]
script = ExtResource("17_6hjcx")
chase_state = NodePath("../ChaseRightState")
cultist = NodePath("../..")