mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-12 07:35:54 +00:00
Enemy state machine
This commit is contained in:
parent
b9b8834bc2
commit
ef6c240e8e
37 changed files with 545 additions and 36 deletions
35
Scripts/Components/FSM/Enemy/Init.cs
Normal file
35
Scripts/Components/FSM/Enemy/Init.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using Cirno.Scripts.Components.Actors;
|
||||
using Cirno.Scripts.Enums;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Components.FSM.Enemy;
|
||||
|
||||
public partial class Init : EnemyStateBase
|
||||
{
|
||||
public override EnemyState StateId => EnemyState.Init;
|
||||
|
||||
[Export]
|
||||
public GenericDamageReceiver DamageReceiver { get; private set; }
|
||||
|
||||
[Export]
|
||||
public EnemyStorageModule StorageModule { get; private set; }
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
GD.Print("Enemy init");
|
||||
DamageReceiver.HealthProvider.MaxResource = StorageModule.Root.EnemyResource.MaxHealth;
|
||||
|
||||
StateMachine.SetState(EnemyState.Idle);
|
||||
}
|
||||
|
||||
public override void PhysicsProcessState(double delta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void ProcessState(double delta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue