Big refactor in place: Organize nodes in line with dependency injection expectations, use state machine flow more

This commit is contained in:
2024-09-11 15:33:36 -07:00
parent 6a4eb81529
commit 4d47a7586e
63 changed files with 1123 additions and 469 deletions

View File

@@ -8,7 +8,7 @@ namespace GameJamDungeon
public partial record State
{
[Meta, Id("enemy_logic_state_alive")]
public abstract partial record Alive : State, IGet<Input.HitByPlayer>, IGet<Input.Killed>, IGet<Input.AttackTimer>
public abstract partial record Alive : State, IGet<Input.HitByPlayer>, IGet<Input.AttackTimer>
{
public Transition On(in Input.HitByPlayer input)
{
@@ -22,12 +22,6 @@ namespace GameJamDungeon
return ToSelf();
}
public Transition On(in Input.Killed input)
{
Output(new Output.Die());
return To<Idle>();
}
public Transition On(in Input.AttackTimer input)
{
return To<Attack>();