Big refactor in place: Organize nodes in line with dependency injection expectations, use state machine flow more
This commit is contained in:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user