Hit shader
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.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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user