mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-13 02:55:53 +00:00
Enemy debris
This commit is contained in:
parent
54b4d94491
commit
0293291315
19 changed files with 175 additions and 27 deletions
22
Scripts/Actors/DeathDebris3D.cs
Normal file
22
Scripts/Actors/DeathDebris3D.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using Cirno.Scripts.Resources;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Actors;
|
||||
|
||||
public partial class DeathDebris3D : Node3D
|
||||
{
|
||||
[Export] public EnemyResource EnemyResource { get; private set; }
|
||||
[Export] public AnimatedSprite3D Sprite { get; private set; }
|
||||
|
||||
public void Init(EnemyResource enemyResource)
|
||||
{
|
||||
EnemyResource = enemyResource;
|
||||
|
||||
if (EnemyResource.DeathAnimation is not null)
|
||||
{
|
||||
Sprite.SetSpriteFrames(enemyResource.DeathAnimation);
|
||||
}
|
||||
|
||||
Sprite.Play();
|
||||
}
|
||||
}
|
||||
1
Scripts/Actors/DeathDebris3D.cs.uid
Normal file
1
Scripts/Actors/DeathDebris3D.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cd2j7yiat8uuh
|
||||
Loading…
Add table
Add a link
Reference in a new issue