Start refactoring UI concerns away from game and into UI logic class
This commit is contained in:
@@ -16,7 +16,6 @@ public partial class GameLogic
|
||||
gameRepo.IsPaused.Sync += OnIsPaused;
|
||||
gameRepo.OpenInventory += OnOpenInventory;
|
||||
gameRepo.CloseInventory += OnCloseInventory;
|
||||
gameRepo.AnnounceMessage += OnAnnounceMessage;
|
||||
gameRepo.DoubleExpTimeStart += OnDoubleExpTimeStart;
|
||||
});
|
||||
OnDetach(() =>
|
||||
@@ -25,7 +24,6 @@ public partial class GameLogic
|
||||
gameRepo.IsPaused.Sync -= OnIsPaused;
|
||||
gameRepo.OpenInventory -= OnOpenInventory;
|
||||
gameRepo.CloseInventory -= OnCloseInventory;
|
||||
gameRepo.AnnounceMessage -= OnAnnounceMessage;
|
||||
gameRepo.DoubleExpTimeStart -= OnDoubleExpTimeStart;
|
||||
});
|
||||
}
|
||||
@@ -34,8 +32,6 @@ public partial class GameLogic
|
||||
|
||||
private void OnCloseInventory() => Output(new Output.CloseInventory());
|
||||
|
||||
private void OnAnnounceMessage(string message) => Output(new Output.AnnounceMessage(message));
|
||||
|
||||
private void OnDoubleExpTimeStart(int lengthOfTimeInSeconds) => Output(new Output.DoubleExpTimeStart(lengthOfTimeInSeconds));
|
||||
|
||||
public void OnIsPaused(bool isPaused) => Output(new Output.SetPauseMode(isPaused));
|
||||
|
||||
Reference in New Issue
Block a user