Basic enemy attack pattern

This commit is contained in:
2024-09-04 23:05:49 -07:00
parent 6fc9568137
commit 54d9dcf9fa
14 changed files with 282 additions and 54 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>
public abstract partial record Alive : State, IGet<Input.HitByPlayer>, IGet<Input.Killed>, IGet<Input.AttackTimer>
{
public Transition On(in Input.HitByPlayer input)
{
@@ -27,6 +27,11 @@ namespace GameJamDungeon
Output(new Output.Die());
return To<Idle>();
}
public Transition On(in Input.AttackTimer input)
{
return To<Attack>();
}
}
}
}