mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 08:45:33 +00:00
29 lines
No EOL
828 B
C#
29 lines
No EOL
828 B
C#
using Cirno.Scripts.Actors;
|
|
using Cirno.Scripts.Enums;
|
|
using Godot;
|
|
|
|
namespace Cirno.Scripts.Components.FSM.Enemy._3D;
|
|
|
|
public partial class Dead : EnemyStateBase3D
|
|
{
|
|
public override EnemyState StateId => EnemyState.Dead;
|
|
|
|
[Export] public EnemyStorage3D Storage { get; private set; }
|
|
|
|
public override void EnterState()
|
|
{
|
|
base.EnterState();
|
|
// player detection
|
|
// damage receiver will be a module
|
|
MainObject.Hide();
|
|
if (Storage.EnemyData.DebrisScene is not null)
|
|
{
|
|
var debris = Storage.EnemyData.DebrisScene.Instantiate<DeathDebris3D>();
|
|
MainObject.GetParent().AddChild(debris);
|
|
debris.GlobalPosition = MainObject.GlobalPosition;
|
|
debris.Init(Storage.EnemyData);
|
|
}
|
|
|
|
//MainObject.QueueFree();
|
|
}
|
|
} |