mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-11 14:16:01 +00:00
Enemy spawning
This commit is contained in:
parent
ede8f2028a
commit
29dc9bebe0
20 changed files with 564 additions and 105 deletions
|
|
@ -1,16 +1,20 @@
|
|||
using Godot;
|
||||
using Cirno.Scripts.Resources;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Components.FSM.Enemy._3D;
|
||||
|
||||
public partial class EnemyFSMAnimatedSprite3D : AnimatedSprite3D
|
||||
{
|
||||
[Export] public EnemyProxy3D EnemyProxy { get; private set; }
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
var enemyFsmProxy = this.GetParentOrNull<EnemyProxy3D>();
|
||||
|
||||
if (enemyFsmProxy?.EnemyResource?.AnimationFrames != null)
|
||||
{
|
||||
this.SpriteFrames = enemyFsmProxy.EnemyResource.AnimationFrames;
|
||||
}
|
||||
//EnemyProxy.Initialized += EnemyFsmProxyOnInitialized;
|
||||
this.SpriteFrames = EnemyProxy.EnemyResource.AnimationFrames;
|
||||
}
|
||||
|
||||
private void EnemyFsmProxyOnInitialized(EnemyResource resource)
|
||||
{
|
||||
this.SpriteFrames = resource.AnimationFrames;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue