Add minimap to sidebar
This commit is contained in:
@@ -3,8 +3,6 @@ public partial class InGameUILogic
|
||||
{
|
||||
public static class Input
|
||||
{
|
||||
public readonly record struct ShowMinimap;
|
||||
public readonly record struct HideMinimap;
|
||||
public readonly record struct ShowInventory;
|
||||
public readonly record struct HideInventory;
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@ public partial class InGameUILogic
|
||||
public readonly record struct AnnounceMessageOnMainScreen(string Message);
|
||||
public readonly record struct AnnounceMessageInInventory(string Message);
|
||||
public readonly record struct RemoveItemFromInventory(InventoryItem Item);
|
||||
public readonly record struct DisplayMinimap;
|
||||
public readonly record struct HideMinimap;
|
||||
public readonly record struct ShowInventory;
|
||||
public readonly record struct HideInventory;
|
||||
}
|
||||
|
||||
@@ -7,9 +7,8 @@ public partial class InGameUILogic
|
||||
public partial record State
|
||||
{
|
||||
[Meta]
|
||||
public partial record Active : State, IGet<Input.ShowMinimap>, IGet<Input.ShowInventory>
|
||||
public partial record Active : State, IGet<Input.ShowInventory>
|
||||
{
|
||||
public Transition On(in Input.ShowMinimap input) => To<MinimapOpen>();
|
||||
public Transition On(in Input.ShowInventory input) => To<InventoryOpen>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
using Chickensoft.Introspection;
|
||||
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
public partial class InGameUILogic
|
||||
{
|
||||
public partial record State
|
||||
{
|
||||
[Meta]
|
||||
public partial record MinimapOpen : State, IGet<Input.HideMinimap>
|
||||
{
|
||||
public MinimapOpen()
|
||||
{
|
||||
OnAttach(() => { Get<IGameRepo>().Pause(); Output(new Output.DisplayMinimap()); });
|
||||
OnDetach(() => { Get<IGameRepo>().Resume(); Output(new Output.HideMinimap()); });
|
||||
}
|
||||
|
||||
public Transition On(in Input.HideMinimap input) => To<Active>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user