public override void Initialize()
        {
            base.Initialize();
            _previousTimeScale = Time.timeScale;

            // Request the providers required
            _dataPersistance   = ManagerProvider.Get <DataPersistenceManager>();
            _transitionManager = ManagerProvider.Get <SceneTransitionManager>();
            _spawnerManager    = ManagerProvider.Get <SpawnerManager>();

            HighScore = _dataPersistance.PlayerData.CurrentHighScore;
        }
        public override IEnumerator Initialization()
        {
            _spawnerManager = ManagerProvider.Get <SpawnerManager>();
            _gameManager    = ManagerProvider.Get <GameManager>();

            _spawnerManager.CreateEnemyPools();
            _gameManager.SetupLevel(3);

            // Instantiate player ship
            AsyncOperationHandle <GameObject> handle = _playerReference.InstantiateAsync(_playerHolder, false);

            handle.Completed += OnPlayerInstantiatedCallback;

            _waveSequence.Initialize();

            yield return(new WaitForEndOfFrame());

            GenericEvent.Trigger(GenericEventType.LevelStarted, null);
        }
 private void OnEnable()
 {
     _spawnerManager = ManagerProvider.Get <SpawnerManager>();
     _spawnerManager.RegisterSpawner(this);
 }
Ejemplo n.º 4
0
 public override void Initialize()
 {
     base.Initialize();
     _spawnerManager = ManagerProvider.Get <SpawnerManager>();
 }
Ejemplo n.º 5
0
 private void Awake()
 {
     _spawnerManager = ManagerProvider.Get <SpawnerManager>();
 }