Load screen with pausing
This commit is contained in:
@@ -41,7 +41,7 @@ public partial class Game : Node3D, IGame
|
||||
{
|
||||
GameBinding = GameLogic.Bind();
|
||||
GameBinding
|
||||
.Handle((in GameLogic.Output.StartGame _) => { GameRepo.Resume(); })
|
||||
.Handle((in GameLogic.Output.StartGame _) => { })
|
||||
.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(); })
|
||||
|
||||
@@ -60,7 +60,7 @@ public class GameRepo : IGameRepo
|
||||
{
|
||||
_inventoryItems = new AutoProp<List<InventoryItemInfo>>([]);
|
||||
_isInventoryScreenOpened = new AutoProp<bool>(false);
|
||||
_isPaused = new AutoProp<bool>(false);
|
||||
_isPaused = new AutoProp<bool>(true);
|
||||
_playerGlobalPosition = new AutoProp<Vector3>(Vector3.Zero);
|
||||
_equippedWeapon = new Weapon();
|
||||
HPBarValue = new AutoProp<int>(0);
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace GameJamDungeon
|
||||
{
|
||||
public Playing()
|
||||
{
|
||||
this.OnEnter(() => { Output(new Output.StartGame()); Get<IGameRepo>().Resume(); });
|
||||
this.OnEnter(() => { Output(new Output.StartGame()); });
|
||||
|
||||
OnAttach(() => Get<IGameRepo>().Ended += OnEnded);
|
||||
OnDetach(() => Get<IGameRepo>().Ended -= OnEnded);
|
||||
|
||||
Reference in New Issue
Block a user