Enemy viewer revamp, loading screen improvement
This commit is contained in:
@@ -8,6 +8,7 @@ public class AppRepo : IAppRepo
|
||||
public event Action? MainMenuEntered;
|
||||
public event Action? GameEntered;
|
||||
public event Action? GameExited;
|
||||
public event Action? DataViewerExited;
|
||||
|
||||
private bool _disposedValue;
|
||||
|
||||
@@ -21,6 +22,8 @@ public class AppRepo : IAppRepo
|
||||
|
||||
public void OnGameOver() => GameExited?.Invoke();
|
||||
|
||||
public void OnDataViewerExited() => DataViewerExited?.Invoke();
|
||||
|
||||
protected void Dispose(bool disposing)
|
||||
{
|
||||
if (!_disposedValue)
|
||||
|
||||
@@ -24,6 +24,8 @@ public partial class AppLogic
|
||||
|
||||
public readonly record struct EnemyViewerOpened;
|
||||
|
||||
public readonly record struct EnemyViewerExited;
|
||||
|
||||
public readonly record struct GalleryOpened;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,8 @@ public partial class AppLogic
|
||||
|
||||
public readonly record struct EnemyViewerOpened;
|
||||
|
||||
public readonly record struct EnemyViewerExited;
|
||||
|
||||
public readonly record struct GalleryOpened;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ public partial class AppLogic
|
||||
public partial record State
|
||||
{
|
||||
[Meta]
|
||||
public partial record EnemyViewer : State
|
||||
public partial record EnemyViewer : State, IGet<Input.EnemyViewerExited>
|
||||
{
|
||||
public EnemyViewer()
|
||||
{
|
||||
@@ -18,7 +18,13 @@ public partial class AppLogic
|
||||
{
|
||||
Output(new Output.EnemyViewerOpened());
|
||||
});
|
||||
this.OnExit(() =>
|
||||
{
|
||||
Output(new Output.EnemyViewerExited());
|
||||
});
|
||||
}
|
||||
|
||||
public Transition On(in Input.EnemyViewerExited input) => To<MainMenu>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user