Barebones inventory menu addition
This commit is contained in:
@@ -24,6 +24,8 @@ public partial class Game : Node3D, IGame
|
||||
|
||||
[Dependency] public IAppRepo AppRepo => this.DependOn<IAppRepo>();
|
||||
|
||||
[Node] public IInventoryMenu InventoryMenu { get; set; } = default!;
|
||||
|
||||
[Node] public Control MiniMap { get; set; } = default!;
|
||||
|
||||
public void Setup()
|
||||
@@ -40,6 +42,8 @@ public partial class Game : Node3D, IGame
|
||||
GameBinding
|
||||
.Handle((in GameLogic.Output.StartGame _) => { GameRepo.Resume(); })
|
||||
.Handle((in GameLogic.Output.SetPauseMode output) => { CallDeferred(nameof(SetPauseMode), output.IsPaused); })
|
||||
.Handle((in GameLogic.Output.SetInventoryMode _) => { InventoryMenu.PopulateItems(_.Inventory); InventoryMenu.Show(); })
|
||||
.Handle((in GameLogic.Output.HideInventory _) => { InventoryMenu.Hide(); InventoryMenu.ClearItems(); })
|
||||
.Handle((in GameLogic.Output.ShowMiniMap _) => { MiniMap.Show(); })
|
||||
.Handle((in GameLogic.Output.HideMiniMap _) => { MiniMap.Hide(); })
|
||||
.Handle((in GameLogic.Output.GameOver _) => { AppRepo.OnGameOver(); });
|
||||
|
||||
Reference in New Issue
Block a user