47 lines
996 B
C#
47 lines
996 B
C#
using Zennysoft.Game.Abstractions;
|
|
|
|
namespace Zennysoft.Ma.Adapter;
|
|
|
|
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);
|
|
}
|
|
}
|