mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-07-04 12:31:16 +00:00
Controllable enemies
This commit is contained in:
parent
cf4b11d157
commit
0aad79a0f8
18 changed files with 893 additions and 23 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=27 format=3 uid="uid://clieeuln36a7a"]
|
||||
[gd_scene load_steps=36 format=3 uid="uid://clieeuln36a7a"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dn6dbog1s2818" path="res://Scripts/Components/FSM/Enemy/EnemyStateMachine.cs" id="1_27djw"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://bcc5mlwwnkvri" path="res://Resources/Sprites/Fairy.tres" id="1_ho0th"]
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
[ext_resource type="Script" uid="uid://7mig30eneu8x" path="res://Scripts/Components/FSM/Enemy/Shooting.cs" id="7_br0mr"]
|
||||
[ext_resource type="Script" uid="uid://bflvr26h52c55" path="res://Scripts/Components/FSM/Enemy/EnemyStorageModule.cs" id="8_fu65u"]
|
||||
[ext_resource type="Script" uid="uid://4hwtlc1ftjsc" path="res://Scripts/Components/FSM/Enemy/Dead.cs" id="8_pi7ab"]
|
||||
[ext_resource type="Script" uid="uid://dj37rup1ibnn6" path="res://Scripts/Components/FSM/Enemy/Controlled.cs" id="9_f3gn5"]
|
||||
[ext_resource type="Script" uid="uid://cq3hkweplldbr" path="res://Scripts/Components/Actors/GenericDamageReceiver.cs" id="10_l7aey"]
|
||||
[ext_resource type="PackedScene" uid="uid://dmumxecckh42r" path="res://Scenes/Activable/BrokenFloorEmitter.tscn" id="11_br0mr"]
|
||||
[ext_resource type="Script" uid="uid://cqwvssstkrdmw" path="res://Scripts/Components/Actors/ActorResourceProvider.cs" id="12_w08b8"]
|
||||
|
|
@ -22,6 +23,10 @@
|
|||
[ext_resource type="Material" uid="uid://dnvwgyt2tbqmr" path="res://Resources/Materials/Player_Blink_Teleport_Material.tres" id="20_8kl2e"]
|
||||
[ext_resource type="Script" uid="uid://dncdgq843sj2f" path="res://Scripts/Components/FSM/Enemy/AnimationModule.cs" id="21_8kl2e"]
|
||||
[ext_resource type="Script" uid="uid://bw4t2clyr6lib" path="res://Scripts/Components/FSM/Enemy/EnemyDropsProvider.cs" id="22_poxpj"]
|
||||
[ext_resource type="Script" uid="uid://dq338w2lw5phl" path="res://Scripts/Components/Actors/KeyboardInputProvider.cs" id="24_f3gn5"]
|
||||
[ext_resource type="Texture2D" uid="uid://b2v6j7lsyltrc" path="res://Sprites/Actors/CirnoWings.png" id="25_hnfyq"]
|
||||
[ext_resource type="Script" uid="uid://d208gvthkstvc" path="res://Scripts/Components/Actors/PlayerCrosshairProvider.cs" id="26_hnfyq"]
|
||||
[ext_resource type="Texture2D" uid="uid://cf2855sd3hqty" path="res://Sprites/Actors/Aiming_Reticule_Small.png" id="27_wafqr"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_pnkma"]
|
||||
|
||||
|
|
@ -40,6 +45,36 @@ orbit_velocity_max = 1.098
|
|||
gravity = Vector3(0, 0, 0)
|
||||
color = Color(0.0392157, 0.380392, 1, 1)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_urwql"]
|
||||
atlas = ExtResource("25_hnfyq")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_wafqr"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_urwql")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_12erk"]
|
||||
atlas = ExtResource("27_wafqr")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_biwfl"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_12erk")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="FairyFsm" type="CharacterBody2D" node_paths=PackedStringArray("EnemyFSM")]
|
||||
collision_layer = 16
|
||||
collision_mask = 33
|
||||
|
|
@ -86,9 +121,18 @@ script = ExtResource("8_pi7ab")
|
|||
StorageModule = NodePath("../../Storage")
|
||||
DropsProvider = NodePath("../../DropsProvider")
|
||||
|
||||
[node name="Controlled" type="Node2D" parent="StateMachine" node_paths=PackedStringArray("StorageModule", "DamageReceiver", "_inputProvider", "CrosshairProvider", "EquippedWeapon", "_moduleNodes")]
|
||||
script = ExtResource("9_f3gn5")
|
||||
StorageModule = NodePath("../../Storage")
|
||||
DamageReceiver = NodePath("../../DamageReceiver")
|
||||
_inputProvider = NodePath("../../InputProvider")
|
||||
CrosshairProvider = NodePath("../../CrosshairProvider")
|
||||
EquippedWeapon = NodePath("../../EnemyWeapon")
|
||||
_moduleNodes = [NodePath("../../AnimationModule")]
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = ExtResource("1_ho0th")
|
||||
animation = &"down"
|
||||
animation = &"up"
|
||||
|
||||
[node name="PlayerDetection" type="Area2D" parent="."]
|
||||
collision_layer = 0
|
||||
|
|
@ -165,6 +209,21 @@ StorageModule = NodePath("../Storage")
|
|||
script = ExtResource("22_poxpj")
|
||||
StorageModule = NodePath("../Storage")
|
||||
|
||||
[node name="PossessionWings" type="AnimatedSprite2D" parent="."]
|
||||
visible = false
|
||||
sprite_frames = SubResource("SpriteFrames_wafqr")
|
||||
|
||||
[node name="InputProvider" type="Node2D" parent="."]
|
||||
script = ExtResource("24_f3gn5")
|
||||
|
||||
[node name="CrosshairProvider" type="Node2D" parent="." node_paths=PackedStringArray("AnimatedSprite")]
|
||||
script = ExtResource("26_hnfyq")
|
||||
AnimatedSprite = NodePath("Crosshair")
|
||||
CrosshairDistance = 35.0
|
||||
|
||||
[node name="Crosshair" type="AnimatedSprite2D" parent="CrosshairProvider"]
|
||||
sprite_frames = SubResource("SpriteFrames_biwfl")
|
||||
|
||||
[connection signal="area_entered" from="PlayerDetection" to="PlayerDetection" method="_on_area_entered"]
|
||||
[connection signal="area_exited" from="PlayerDetection" to="PlayerDetection" method="_on_area_exited"]
|
||||
[connection signal="area_entered" from="DamageReceiver" to="DamageReceiver" method="_on_damage_hitbox_area_entered"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue