Files
GameJamDungeon/Zennysoft.Game.Ma.Implementation/Game/state/gamestates/GameState.State.InGame..cs
2025-06-28 00:30:16 -07:00

57 lines
1.4 KiB
C#

using Chickensoft.Introspection;
using Chickensoft.LogicBlocks;
namespace Zennysoft.Ma.Adapter;
public partial class GameState
{
public partial record State
{
[Meta, LogicBlock(typeof(State), Diagram = true)]
public partial record InGame : State,
IGet<Input.InventoryButtonPressed>,
IGet<Input.MiniMapButtonPressed>,
IGet<Input.PauseButtonPressed>,
IGet<Input.DebugButtonPressed>,
IGet<Input.FloorExitEntered>,
IGet<Input.GameOver>
{
public Transition On(in Input.InventoryButtonPressed input)
{
Output(new Output.OpenInventoryMenu());
return To<InventoryScreen>();
}
public Transition On(in Input.MiniMapButtonPressed input)
{
Output(new Output.OpenMiniMap());
return To<MiniMapScreen>();
}
public Transition On(in Input.PauseButtonPressed input)
{
Output(new Output.OpenPauseScreen());
return To<PauseScreen>();
}
public Transition On(in Input.DebugButtonPressed input)
{
Output(new Output.OpenDebugMenu());
return To<DebugMenu>();
}
public Transition On(in Input.FloorExitEntered input)
{
Output(new Output.OpenTeleportScreen());
return To<AskForTeleportScreen>();
}
public Transition On(in Input.GameOver input)
{
Output(new Output.GameOver());
return To<GameOver>();
}
}
}
}