27 lines
586 B
C#
27 lines
586 B
C#
using Chickensoft.Introspection;
|
|
using Chickensoft.LogicBlocks;
|
|
|
|
namespace Zennysoft.Ma.Godot.Adapter;
|
|
|
|
public partial class GameLogic
|
|
{
|
|
public partial record State
|
|
{
|
|
[Meta]
|
|
public partial record Paused : Playing, IGet<Input.UnpauseGame>
|
|
{
|
|
public Paused()
|
|
{
|
|
this.OnEnter(() =>
|
|
{
|
|
Get<IGameRepo>().Pause();
|
|
Output(new Output.ShowPauseMenu());
|
|
});
|
|
this.OnExit(() => Output(new Output.ExitPauseMenu()));
|
|
}
|
|
|
|
public virtual Transition On(in Input.UnpauseGame input) => To<Resuming>();
|
|
}
|
|
}
|
|
}
|