26 lines
632 B
C#
26 lines
632 B
C#
using Chickensoft.Introspection;
|
|
using Chickensoft.LogicBlocks;
|
|
|
|
namespace Zennysoft.Game.Ma.Implementation;
|
|
|
|
public partial class GameLogic
|
|
{
|
|
public partial record State
|
|
{
|
|
[Meta]
|
|
public partial record InventoryOpened : Playing, IGet<Input.CloseInventory>
|
|
{
|
|
public InventoryOpened()
|
|
{
|
|
this.OnEnter(() => { Get<IGameRepo>().Pause(); Output(new Output.OpenInventory()); });
|
|
this.OnExit(() => { Get<IGameRepo>().Resume(); Output(new Output.CloseInventory()); });
|
|
}
|
|
|
|
public Transition On(in Input.CloseInventory input)
|
|
{
|
|
return To<Playing>();
|
|
}
|
|
}
|
|
}
|
|
}
|