Move App logic to other projects

This commit is contained in:
2025-03-07 01:08:35 -08:00
parent 3b5ee84ce2
commit 1cb79f5b30
49 changed files with 185 additions and 205 deletions

View File

@@ -0,0 +1,46 @@
using Zennysoft.Game.Abstractions;
namespace Zennysoft.Game.Ma.Implementation;
public class AppRepo : IAppRepo
{
public event Action? SplashScreenSkipped;
public event Action? MainMenuEntered;
public event Action? GameEntered;
public event Action? GameExited;
private bool _disposedValue;
public void SkipSplashScreen() => SplashScreenSkipped?.Invoke();
public void OnMainMenuEntered() => MainMenuEntered?.Invoke();
public void OnEnterGame() => GameEntered?.Invoke();
public void OnExitGame() => GameExited?.Invoke();
public void OnGameOver() => GameExited?.Invoke();
protected void Dispose(bool disposing)
{
if (!_disposedValue)
{
if (disposing)
{
// Dispose managed objects.
SplashScreenSkipped = null;
MainMenuEntered = null;
GameEntered = null;
GameExited = null;
}
_disposedValue = true;
}
}
public void Dispose()
{
Dispose(disposing: true);
GC.SuppressFinalize(this);
}
}