mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
39 lines
No EOL
866 B
C#
39 lines
No EOL
866 B
C#
using System.Threading.Tasks;
|
|
using Cirno.Scripts.Components.Actors;
|
|
using Cirno.Scripts.Components.FSM.Enemy;
|
|
using Cirno.Scripts.Enums;
|
|
using Godot;
|
|
|
|
namespace Cirno.Scripts.Components.FSM.Boss;
|
|
|
|
public partial class Idle : EnemyStateBase
|
|
{
|
|
public override EnemyState StateId => EnemyState.Idle;
|
|
|
|
[Export]
|
|
public EnemyStorageModule StorageModule { get; private set; }
|
|
|
|
[Export]
|
|
public GenericDamageReceiver DamageReceiver { get; private set; }
|
|
|
|
public override void EnterState()
|
|
{
|
|
base.EnterState();
|
|
DamageReceiver.ChangeState(false);
|
|
GD.Print("Boss idle");
|
|
_ = DelayStart();
|
|
}
|
|
|
|
private async Task DelayStart()
|
|
{
|
|
await Task.Delay(1000);
|
|
ChangeState(EnemyState.Shooting);
|
|
}
|
|
|
|
public override void ExitState()
|
|
{
|
|
base.ExitState();
|
|
|
|
}
|
|
|
|
} |