Re-implement audio managers
This commit is contained in:
@@ -23,8 +23,6 @@ public partial class Game : Node3D, IGame
|
||||
|
||||
IPlayer IProvide<IPlayer>.Value() => Player;
|
||||
|
||||
IGameEventDepot IProvide<IGameEventDepot>.Value() => GameEventDepot;
|
||||
|
||||
IMap IProvide<IMap>.Value() => Map;
|
||||
|
||||
private static SimpleInjector.Container _container;
|
||||
@@ -33,8 +31,6 @@ public partial class Game : Node3D, IGame
|
||||
|
||||
public IGameState GameState { get; set; } = default!;
|
||||
|
||||
public IGameEventDepot GameEventDepot { get; set; } = default!;
|
||||
|
||||
public IGameRepo GameRepo { get; set; } = default!;
|
||||
|
||||
public GameState.IBinding GameBinding { get; set; } = default!;
|
||||
@@ -83,10 +79,8 @@ public partial class Game : Node3D, IGame
|
||||
|
||||
GameRepo = _container.GetInstance<IGameRepo>();
|
||||
GameState = _container.GetInstance<IGameState>();
|
||||
GameEventDepot = new GameEventDepot();
|
||||
GameState.Set(GameRepo);
|
||||
GameState.Set(AppRepo);
|
||||
GameState.Set(GameEventDepot);
|
||||
GameState.Set(Player);
|
||||
GameState.Set(Map);
|
||||
GameState.Set(InGameUI);
|
||||
@@ -158,6 +152,7 @@ public partial class Game : Node3D, IGame
|
||||
InGameUI.PlayerInfoUI.Activate();
|
||||
Player.TeleportPlayer(Map.CurrentFloor.GetPlayerSpawnPoint());
|
||||
Player.Activate();
|
||||
Autoload.BgmPlayer.Play(BackgroundMusic.CrossingTheGate);
|
||||
})
|
||||
.Handle((in GameState.Output.LoadGameFromFile _) =>
|
||||
{
|
||||
@@ -288,7 +283,6 @@ public partial class Game : Node3D, IGame
|
||||
|
||||
public void FloorExitReached()
|
||||
{
|
||||
GameEventDepot.OnTeleportEntered();
|
||||
GameState.Input(new GameState.Input.FloorExitEntered());
|
||||
}
|
||||
|
||||
@@ -403,7 +397,6 @@ public partial class Game : Node3D, IGame
|
||||
private void FloorClearMenu_TransitionCompleted()
|
||||
{
|
||||
GameRepo.Resume();
|
||||
GameEventDepot.OnDungeonAThemeAreaEntered();
|
||||
}
|
||||
|
||||
private void GameEventDepot_RestorativePickedUp(IHealthPack obj) => Player.Stats.SetCurrentVT(Player.Stats.CurrentVT.Value + (int)obj.RestoreAmount);
|
||||
|
||||
Reference in New Issue
Block a user