cirnogodot/Scenes/Actors/Generic_Enemy_FSM_3D.tscn
2025-06-22 13:52:23 +02:00

158 lines
7.9 KiB
Text

[gd_scene load_steps=25 format=3 uid="uid://bh3vxmqflijgj"]
[ext_resource type="Script" uid="uid://dwregubt4iila" path="res://Scripts/Components/FSM/Enemy/3D/EnemyProxy3D.cs" id="1_a3crc"]
[ext_resource type="Resource" uid="uid://ccym6mcq4fbul" path="res://Resources/Enemies/Fairy_Guard_3D.tres" id="2_jgarc"]
[ext_resource type="Script" uid="uid://c651imhj6rjsh" path="res://Scripts/Components/FSM/Enemy/3D/EnemyStateMachine3D.cs" id="2_xne4s"]
[ext_resource type="Script" uid="uid://cy34e3htvbvnl" path="res://Scripts/Components/FSM/Enemy/3D/Init.cs" id="4_jgarc"]
[ext_resource type="Script" uid="uid://jpdgfn701crh" path="res://Scripts/Components/FSM/Enemy/3D/Idle.cs" id="5_rg1hb"]
[ext_resource type="Script" uid="uid://dvtdw2hcp4rm2" path="res://Scripts/Components/FSM/Enemy/3D/Alert.cs" id="6_jgarc"]
[ext_resource type="Script" uid="uid://crahxykgis2bp" path="res://Scripts/Components/FSM/Enemy/3D/Shooting.cs" id="7_rg1hb"]
[ext_resource type="Script" uid="uid://3irm5sccr2fc" path="res://Scripts/Components/FSM/Enemy/3D/Dead.cs" id="8_5j04l"]
[ext_resource type="Script" uid="uid://mpws3eyrmx0q" path="res://Scripts/Components/FSM/Enemy/3D/Controlled.cs" id="9_dm2sd"]
[ext_resource type="SpriteFrames" uid="uid://ch2ll1on8im2p" path="res://Resources/Sprites/FairyGuard.tres" id="10_hew1j"]
[ext_resource type="Script" uid="uid://de31afbiua8xu" path="res://Scripts/Components/FSM/Enemy/3D/EnemyFSMAnimatedSprite3D.cs" id="11_jgarc"]
[ext_resource type="Script" uid="uid://chq5a73kw0c0m" path="res://Scripts/Components/FSM/Enemy/3D/EnemyStorage3D.cs" id="11_xne4s"]
[ext_resource type="Script" uid="uid://extjdng8nk6r" path="res://Scripts/Components/FSM/Enemy/3D/PlayerDetection3D.cs" id="13_rg1hb"]
[ext_resource type="Script" uid="uid://k5k8wf821ytg" path="res://Scripts/Components/FSM/Enemy/3D/NavigationProvider3D.cs" id="14_dm2sd"]
[ext_resource type="PackedScene" uid="uid://cfgc6ik8vb08c" path="res://Scenes/Weapons/BaseWeapon_3D.tscn" id="15_27vgy"]
[ext_resource type="Script" uid="uid://bvcfa6wivpgy1" path="res://Scripts/Components/FSM/Enemy/3D/EnemyDamageModule3D.cs" id="16_27vgy"]
[ext_resource type="Script" uid="uid://dmawekjfas6k8" path="res://Scripts/Components/Actors/DamageReceiver3D.cs" id="17_tabhk"]
[ext_resource type="Script" uid="uid://cqwvssstkrdmw" path="res://Scripts/Components/Actors/ActorResourceProvider.cs" id="18_4fnoq"]
[ext_resource type="Script" uid="uid://dvln1783wvvuw" path="res://Scripts/Components/Actors/ShadowProvider.cs" id="19_4fnoq"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_jgarc"]
radius = 0.264547
height = 0.935884
[sub_resource type="CylinderShape3D" id="CylinderShape3D_5j04l"]
height = 1.91858
radius = 3.04834
[sub_resource type="CylinderShape3D" id="CylinderShape3D_uv2lf"]
height = 0.853027
radius = 0.426758
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_cc7e7"]
transparency = 1
depth_draw_mode = 2
shading_mode = 0
albedo_color = Color(0, 0, 0, 0.235294)
[sub_resource type="QuadMesh" id="QuadMesh_05pdu"]
material = SubResource("StandardMaterial3D_cc7e7")
[node name="Enemy" type="CharacterBody3D" node_paths=PackedStringArray("EnemyFSM")]
collision_layer = 64
collision_mask = 17
script = ExtResource("1_a3crc")
EnemyFSM = NodePath("StateMachine")
EnemyResource = ExtResource("2_jgarc")
[node name="CollisionShape2D" type="CollisionShape3D" parent="."]
shape = SubResource("CapsuleShape3D_jgarc")
[node name="StateMachine" type="Node" parent="."]
script = ExtResource("2_xne4s")
[node name="Init" type="Node" parent="StateMachine" node_paths=PackedStringArray("Storage", "DetectionProvider")]
script = ExtResource("4_jgarc")
Storage = NodePath("../../Storage")
DetectionProvider = NodePath("../../PlayerDetectionProvider")
[node name="Idle" type="Node" parent="StateMachine" node_paths=PackedStringArray("Storage", "PlayerDetection", "_moduleNodes")]
script = ExtResource("5_rg1hb")
Storage = NodePath("../../Storage")
PlayerDetection = NodePath("../../PlayerDetectionProvider")
DebugEnabled = true
_moduleNodes = [NodePath("../../DamageModule")]
[node name="Alert" type="Node" parent="StateMachine" node_paths=PackedStringArray("Storage", "PlayerDetection", "NavigationModule", "_moduleNodes")]
script = ExtResource("6_jgarc")
Storage = NodePath("../../Storage")
PlayerDetection = NodePath("../../PlayerDetectionProvider")
NavigationModule = NodePath("../../NavigationProvider")
DebugEnabled = true
_moduleNodes = [NodePath("../../DamageModule")]
[node name="Shooting" type="Node" parent="StateMachine" node_paths=PackedStringArray("Storage", "PlayerDetection", "EquippedWeapon", "NavigationModule", "_moduleNodes")]
script = ExtResource("7_rg1hb")
Storage = NodePath("../../Storage")
PlayerDetection = NodePath("../../PlayerDetectionProvider")
EquippedWeapon = NodePath("../../Weapon")
NavigationModule = NodePath("../../NavigationProvider")
_moduleNodes = [NodePath("../../DamageModule")]
[node name="Dead" type="Node" parent="StateMachine" node_paths=PackedStringArray("Storage")]
script = ExtResource("8_5j04l")
Storage = NodePath("../../Storage")
[node name="Controlled" type="Node" parent="StateMachine" node_paths=PackedStringArray("Storage", "_moduleNodes")]
script = ExtResource("9_dm2sd")
Storage = NodePath("../../Storage")
_moduleNodes = [NodePath("../../DamageModule")]
[node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="." node_paths=PackedStringArray("EnemyProxy")]
pixel_size = 0.05
billboard = 1
texture_filter = 0
sprite_frames = ExtResource("10_hew1j")
animation = &"down"
script = ExtResource("11_jgarc")
EnemyProxy = NodePath("..")
[node name="Storage" type="Node" parent="." node_paths=PackedStringArray("Root")]
script = ExtResource("11_xne4s")
Root = NodePath("..")
[node name="PlayerDetectionProvider" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 2
script = ExtResource("13_rg1hb")
ObstaclesCollisionMask = 17
[node name="CollisionShape3D" type="CollisionShape3D" parent="PlayerDetectionProvider"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.557434, 0)
shape = SubResource("CylinderShape3D_5j04l")
[node name="NavigationProvider" type="Node" parent="." node_paths=PackedStringArray("NavigationAgent", "StorageModule")]
script = ExtResource("14_dm2sd")
NavigationAgent = NodePath("../NavigationAgent3D")
StorageModule = NodePath("../Storage")
[node name="NavigationAgent3D" type="NavigationAgent3D" parent="."]
path_postprocessing = 1
debug_enabled = true
[node name="Weapon" parent="." instance=ExtResource("15_27vgy")]
[node name="DamageModule" type="Node" parent="." node_paths=PackedStringArray("DamageReceiver", "StorageModule")]
script = ExtResource("16_27vgy")
DamageReceiver = NodePath("../DamageReceiver")
StorageModule = NodePath("../Storage")
[node name="DamageReceiver" type="Area3D" parent="." node_paths=PackedStringArray("HealthProvider")]
collision_layer = 64
collision_mask = 8
script = ExtResource("17_tabhk")
HealthProvider = NodePath("HealthProvider")
BulletGroup = 2
DeleteParentOnDeath = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="DamageReceiver"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00463867, 0)
shape = SubResource("CylinderShape3D_uv2lf")
[node name="HealthProvider" type="Node" parent="DamageReceiver"]
script = ExtResource("18_4fnoq")
ResourceName = "Health"
[node name="Shadow" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, -0.29, 0)
mesh = SubResource("QuadMesh_05pdu")
script = ExtResource("19_4fnoq")
CollisionMask = 1
[connection signal="body_entered" from="PlayerDetectionProvider" to="PlayerDetectionProvider" method="_on_body_entered"]
[connection signal="body_exited" from="PlayerDetectionProvider" to="PlayerDetectionProvider" method="_on_body_exited"]
[connection signal="velocity_computed" from="NavigationAgent3D" to="NavigationProvider" method="_on_navigation_agent_3d_velocity_computed"]
[connection signal="area_entered" from="DamageReceiver" to="DamageReceiver" method="_on_damage_hitbox_area_entered"]