Hit shader

This commit is contained in:
2024-09-15 17:12:18 -07:00
parent 470b853916
commit 4a1fdd94f8
19 changed files with 528 additions and 257 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.AttackTimer>
public abstract partial record Alive : State, IGet<Input.HitByPlayer>, IGet<Input.AttackTimer>, IGet<Input.EnemyDefeated>
{
public Transition On(in Input.HitByPlayer input)
{
@@ -26,6 +26,12 @@ namespace GameJamDungeon
{
return To<Attack>();
}
public Transition On(in Input.EnemyDefeated input)
{
Output(new Output.Defeated());
return ToSelf();
}
}
}
}