121celisuis

Untitled

Mar 26th, 2026
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.65 KB | None | 0 0
  1. using System;
  2. using System.Threading;
  3. using BriarQueen.Framework.Managers.Achievements.Steam;
  4. using BriarQueen.Framework.Managers.Audio;
  5. using BriarQueen.Framework.Managers.Hints;
  6. using BriarQueen.Framework.Managers.Input;
  7. using BriarQueen.Framework.Managers.Interaction;
  8. using BriarQueen.Framework.Managers.IO;
  9. using BriarQueen.Framework.Managers.Levels;
  10. using BriarQueen.Framework.Managers.Player;
  11. using BriarQueen.Framework.Managers.UI;
  12. using BriarQueen.Framework.Services.Settings;
  13. using BriarQueen.Framework.Services.Tutorials;
  14. using BriarQueen.Game.Cinematics;
  15. using Cysharp.Threading.Tasks;
  16. using UnityEngine;
  17. using VContainer.Unity;
  18.  
  19. namespace BriarQueen.Game.Misc
  20. {
  21.     public class GameBootstrapper : IAsyncStartable
  22.     {
  23.         private readonly AudioManager _audioManager;
  24.         private readonly HintManager _hintManager;
  25.         private readonly InputManager _inputManager;
  26.         private readonly InteractManager _interactManager;
  27.         private readonly LevelManager _levelManager;
  28.         private readonly PlayerManager _playerManager;
  29.         private readonly SaveManager _saveManager;
  30.         private readonly SettingsService _settingsService;
  31.         private readonly SplashScreens _splashScreens;
  32.         private readonly SteamManager _steamManager;
  33.         private readonly TutorialService _tutorialService;
  34.         private readonly UIManager _uiManager;
  35.  
  36.         public GameBootstrapper(
  37.             AudioManager audioManager,
  38.             InteractManager interactManager,
  39.             InputManager inputManager,
  40.             LevelManager levelManager,
  41.             PlayerManager playerManager,
  42.             SaveManager saveManager,
  43.             UIManager uiManager,
  44.             HintManager hintManager,
  45.             SettingsService settingsService,
  46.             SteamManager steamManager,
  47.             SplashScreens splashScreens,
  48.             TutorialService tutorialService)
  49.         {
  50.             _audioManager = audioManager;
  51.             _interactManager = interactManager;
  52.             _inputManager = inputManager;
  53.             _levelManager = levelManager;
  54.             _playerManager = playerManager;
  55.             _saveManager = saveManager;
  56.             _uiManager = uiManager;
  57.             _hintManager = hintManager;
  58.             _settingsService = settingsService;
  59.             _steamManager = steamManager;
  60.             _splashScreens = splashScreens;
  61.         }
  62.  
  63.         public async UniTask StartAsync(CancellationToken cancellationToken)
  64.         {
  65.             Debug.Log("[Bootstrap] Boot start");
  66.  
  67.             Debug.Log("[Bootstrap] Audio...");
  68.             _audioManager.Initialize();
  69.  
  70.             Debug.Log("[Bootstrap] Settings...");
  71.             await _settingsService.InitializeAsync();
  72.  
  73.             Debug.Log("[Bootstrap] Input...");
  74.             _inputManager.Initialize();
  75.  
  76.             Debug.Log("[Bootstrap] Save...");
  77.             _saveManager.Initialize();
  78.  
  79.             Debug.Log("[Bootstrap] Player...");
  80.             _playerManager.Initialize();
  81.  
  82.             Debug.Log("[Bootstrap] Level...");
  83.             _levelManager.Initialize();
  84.  
  85.             Debug.Log("[Bootstrap] Interact...");
  86.             _interactManager.Initialize();
  87.  
  88.             Debug.Log("[Bootstrap] UI...");
  89.             _uiManager.Initialize();
  90.  
  91.             Debug.Log("[Bootstrap] Hints...");
  92.             _hintManager.Initialize();
  93.  
  94.             Debug.Log("[Bootstrap] Steam...");
  95.             _steamManager.Initialize();
  96.  
  97.             Debug.Log($"[Bootstrap] Splash ref = {(_splashScreens ? _splashScreens.name : "NULL")}");
  98.             _splashScreens?.Play();
  99.             Debug.Log("[Bootstrap] Called SplashScreens.Play()");
  100.         }
  101.     }
  102. }
Advertisement
Add Comment
Please, Sign In to add comment