Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Threading;
- using BriarQueen.Framework.Managers.Achievements.Steam;
- using BriarQueen.Framework.Managers.Audio;
- using BriarQueen.Framework.Managers.Hints;
- using BriarQueen.Framework.Managers.Input;
- using BriarQueen.Framework.Managers.Interaction;
- using BriarQueen.Framework.Managers.IO;
- using BriarQueen.Framework.Managers.Levels;
- using BriarQueen.Framework.Managers.Player;
- using BriarQueen.Framework.Managers.UI;
- using BriarQueen.Framework.Services.Settings;
- using BriarQueen.Framework.Services.Tutorials;
- using BriarQueen.Game.Cinematics;
- using Cysharp.Threading.Tasks;
- using UnityEngine;
- using VContainer.Unity;
- namespace BriarQueen.Game.Misc
- {
- public class GameBootstrapper : IAsyncStartable
- {
- private readonly AudioManager _audioManager;
- private readonly HintManager _hintManager;
- private readonly InputManager _inputManager;
- private readonly InteractManager _interactManager;
- private readonly LevelManager _levelManager;
- private readonly PlayerManager _playerManager;
- private readonly SaveManager _saveManager;
- private readonly SettingsService _settingsService;
- private readonly SplashScreens _splashScreens;
- private readonly SteamManager _steamManager;
- private readonly TutorialService _tutorialService;
- private readonly UIManager _uiManager;
- public GameBootstrapper(
- AudioManager audioManager,
- InteractManager interactManager,
- InputManager inputManager,
- LevelManager levelManager,
- PlayerManager playerManager,
- SaveManager saveManager,
- UIManager uiManager,
- HintManager hintManager,
- SettingsService settingsService,
- SteamManager steamManager,
- SplashScreens splashScreens,
- TutorialService tutorialService)
- {
- _audioManager = audioManager;
- _interactManager = interactManager;
- _inputManager = inputManager;
- _levelManager = levelManager;
- _playerManager = playerManager;
- _saveManager = saveManager;
- _uiManager = uiManager;
- _hintManager = hintManager;
- _settingsService = settingsService;
- _steamManager = steamManager;
- _splashScreens = splashScreens;
- }
- public async UniTask StartAsync(CancellationToken cancellationToken)
- {
- Debug.Log("[Bootstrap] Boot start");
- Debug.Log("[Bootstrap] Audio...");
- _audioManager.Initialize();
- Debug.Log("[Bootstrap] Settings...");
- await _settingsService.InitializeAsync();
- Debug.Log("[Bootstrap] Input...");
- _inputManager.Initialize();
- Debug.Log("[Bootstrap] Save...");
- _saveManager.Initialize();
- Debug.Log("[Bootstrap] Player...");
- _playerManager.Initialize();
- Debug.Log("[Bootstrap] Level...");
- _levelManager.Initialize();
- Debug.Log("[Bootstrap] Interact...");
- _interactManager.Initialize();
- Debug.Log("[Bootstrap] UI...");
- _uiManager.Initialize();
- Debug.Log("[Bootstrap] Hints...");
- _hintManager.Initialize();
- Debug.Log("[Bootstrap] Steam...");
- _steamManager.Initialize();
- Debug.Log($"[Bootstrap] Splash ref = {(_splashScreens ? _splashScreens.name : "NULL")}");
- _splashScreens?.Play();
- Debug.Log("[Bootstrap] Called SplashScreens.Play()");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment