Simplify enemy animation logic

This commit is contained in:
2025-10-06 02:13:05 -07:00
parent ad29e57fc9
commit ec0f9ebff7
56 changed files with 1584 additions and 5011 deletions

View File

@@ -28,8 +28,11 @@ public abstract partial class DungeonRoom : Node3D, IDungeonRoom
public void Setup()
{
_enemiesInRoom = [];
//_room.BodyEntered += Room_BodyEntered;
//_room.BodyExited += Room_BodyExited;
if (_room != null)
{
_room.BodyEntered += Room_BodyEntered;
_room.BodyExited += Room_BodyExited;
}
}
private void Room_BodyExited(Node3D body)

View File

@@ -0,0 +1,10 @@
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
namespace Zennysoft.Game.Ma;
[Meta(typeof(IAutoNode))]
public partial class SpecialRoom : DungeonRoom
{
public override void _Notification(int what) => this.Notify(what);
}

View File

@@ -0,0 +1 @@
uid://bccyfmj8ikewh

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=101 format=4 uid="uid://bo20ffw2ygbks"]
[gd_scene load_steps=97 format=4 uid="uid://bo20ffw2ygbks"]
[ext_resource type="Script" uid="uid://xd6tx3lifebl" path="res://src/map/dungeon/code/SpecialFloor.cs" id="1_j4ho3"]
[ext_resource type="Texture2D" uid="uid://ddrvsy7psmwig" path="res://src/map/dungeon/models/Special Floors & Rooms/35. Goddess of Guidance's Floor/GoG Room mirrored_DARKER_STONE_AREA_2.png" id="2_jbyuo"]
@@ -15,10 +15,6 @@
[ext_resource type="Texture2D" uid="uid://nvg6i8gbgqjv" path="res://src/map/dungeon/models/Special Floors & Rooms/35. Goddess of Guidance's Floor/GoG Room mirrored_angkor_mural.jpg" id="14_tf4w3"]
[ext_resource type="Texture2D" uid="uid://3w1ac5fvks5v" path="res://src/map/dungeon/models/Special Floors & Rooms/35. Goddess of Guidance's Floor/GoG Room mirrored_area_2_big_tile.png" id="15_nduur"]
[ext_resource type="Shader" uid="uid://beg8sp6kw66w8" path="res://src/map/map shaders/GOGROOM Water.gdshader" id="16_q4do2"]
[ext_resource type="PackedScene" uid="uid://dbvr8ewajja6a" path="res://src/enemy/EnemyDatabase.tscn" id="17_j4ho3"]
[ext_resource type="PackedScene" uid="uid://bs56ccgosmu47" path="res://src/enemy/enemy_types/01. sproingy/Sproingy.tscn" id="18_qt11j"]
[ext_resource type="PackedScene" uid="uid://b0gwivt7cw7nd" path="res://src/enemy/enemy_types/02. michael/Michael.tscn" id="19_tkf4r"]
[ext_resource type="PackedScene" uid="uid://cvk007twac22c" path="res://src/enemy/enemy_types/03. filth_eater/FilthEater.tscn" id="20_fs8fd"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_q1ixl"]
resource_name = "Material.014"
@@ -1078,8 +1074,3 @@ transform = Transform3D(230, 0, 0, 0, 230, 0, 0, 0, 230, 0, -4.49359, 0)
mesh = SubResource("PlaneMesh_slalf")
skeleton = NodePath("../Model/GoG Room mirrored")
surface_material_override/0 = SubResource("ShaderMaterial_savej")
[node name="EnemyDatabase" parent="." instance=ExtResource("17_j4ho3")]
unique_name_in_owner = true
EnemyList = Array[PackedScene]([ExtResource("18_qt11j"), ExtResource("19_tkf4r"), ExtResource("20_fs8fd")])
SpawnRate = PackedFloat32Array(0.5, 1, 1)