29 lines
729 B
C#
29 lines
729 B
C#
using Chickensoft.Introspection;
|
|
using Chickensoft.LogicBlocks;
|
|
using static Zennysoft.Ma.Adapter.GameState.Output;
|
|
|
|
namespace Zennysoft.Ma.Adapter;
|
|
|
|
public partial class GameState
|
|
{
|
|
public partial record State
|
|
{
|
|
[Meta, LogicBlock(typeof(State), Diagram = true)]
|
|
public partial record PauseScreen : State, IGet<Input.PauseButtonPressed>, IGet<Input.ExitGame>
|
|
{
|
|
public Transition On(in Input.PauseButtonPressed input)
|
|
{
|
|
Output(new Output.ClosePauseScreen());
|
|
return To<InGame>();
|
|
}
|
|
|
|
public Transition On(in Input.ExitGame input)
|
|
{
|
|
Output(new Output.ClosePauseScreen());
|
|
Output(new Output.ExitGame());
|
|
return To<State>();
|
|
}
|
|
}
|
|
}
|
|
}
|