mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 19:15:53 +00:00
Enemy debris
This commit is contained in:
parent
54b4d94491
commit
0293291315
19 changed files with 175 additions and 27 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using Cirno.Scripts.Enums;
|
||||
using Cirno.Scripts.Actors;
|
||||
using Cirno.Scripts.Enums;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Components.FSM.Enemy._3D;
|
||||
|
|
@ -15,5 +16,15 @@ public partial class Dead : EnemyStateBase3D
|
|||
// 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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue