Slightly rework death screen
This commit is contained in:
@@ -16,6 +16,6 @@ public partial class PlayerLogic
|
||||
|
||||
public readonly record struct AttackAnimationFinished;
|
||||
|
||||
public readonly record struct Killed;
|
||||
public readonly record struct Die;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Numerics;
|
||||
|
||||
namespace Zennysoft.Game.Ma.Implementation;
|
||||
namespace Zennysoft.Game.Ma.Implementation;
|
||||
|
||||
public partial class PlayerLogic
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ public partial class PlayerLogic
|
||||
public partial record State
|
||||
{
|
||||
[Meta, Id("player_logic_alive")]
|
||||
public abstract partial record Alive : State, IGet<Input.PhysicsTick>, IGet<Input.Killed>
|
||||
public abstract partial record Alive : State, IGet<Input.PhysicsTick>, IGet<Input.Die>
|
||||
{
|
||||
public virtual Transition On(in Input.PhysicsTick input)
|
||||
{
|
||||
@@ -17,9 +17,10 @@ public partial class PlayerLogic
|
||||
return ToSelf();
|
||||
}
|
||||
|
||||
public Transition On(in Input.Killed input)
|
||||
public Transition On(in Input.Die input)
|
||||
{
|
||||
GD.Print("Player died");
|
||||
Get<IGameRepo>().GameEnded();
|
||||
return To<Dead>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user