38 lines
815 B
C#
38 lines
815 B
C#
using Chickensoft.Introspection;
|
|
using Godot;
|
|
|
|
namespace Zennysoft.Game.Ma;
|
|
|
|
public partial class BossLogic
|
|
{
|
|
public partial record State
|
|
{
|
|
[Meta, Id("boss_logic_state_alive")]
|
|
public abstract partial record Alive : State, IGet<Input.BossDefeated>, IGet<Input.AttackTimer>, IGet<Input.StopMoving>, IGet<Input.StartAttacking>
|
|
{
|
|
}
|
|
|
|
public Transition On(in Input.AttackTimer input)
|
|
{
|
|
Output(new Output.TakeAction());
|
|
return To<Attacking>();
|
|
}
|
|
|
|
public Transition On(in Input.BossDefeated input)
|
|
{
|
|
Output(new Output.Defeated());
|
|
return To<Defeated>();
|
|
}
|
|
|
|
public Transition On(in Input.StopMoving input)
|
|
{
|
|
return To<Idle>();
|
|
}
|
|
|
|
public Transition On(in Input.StartAttacking input)
|
|
{
|
|
return To<Attacking>();
|
|
}
|
|
}
|
|
}
|