Exemplo n.º 1
0
        private void OnInstaller(LevelGenerator levelGenerator, PickerBase pickerBase)
        {
            _levelGenerator = levelGenerator;
            _pickerBase     = pickerBase;

            AssetManager.Instance.LoadPlatformPrefabs();

            _pickerBase.Initialize();
        }
Exemplo n.º 2
0
        private void CheckContinue(PickerBase picker)
        {
            var counter = _checkPointCounterPlatform.GetCounter();

            if (counter >= _target)
            {
                _checkPointCounterPlatform.SuccesfulAction();
                _gate1.transform.DORotate(new Vector3(-60, 90, 90), 1f);
                _gate2.transform.DORotate(new Vector3(60, 90, 90), 1f).OnComplete(() =>
                {
                    GameEventBus.InvokeEvent(GameEventType.CHECKPOINT);
                });
                picker.OnPointGained.SafeInvoke(counter * 5);
            }
            else
            {
                Debug.Log("Fail");
                GameEventBus.InvokeEvent(GameEventType.FAIL);
            }
        }
Exemplo n.º 3
0
        private void OnInstaller(PickerBase pickerBase, PoolManager poolManager)
        {
            _poolManager         = poolManager;
            _pickerBase          = pickerBase;
            _pickerStartPosition = new Vector3(0, 0.6f, 2.5f);
            _levelIndex          = 1;

            GameEventBus.SubscribeEvent(GameEventType.FINISHED, () =>
            {
                Timer.Instance.TimerWait(2f, () =>
                {
                    _poolManager.DeactivateWholePool();
                    _levelIndex++;
                    GenerateLevel();
                });
            });

            GameEventBus.SubscribeEvent(GameEventType.FAIL, () =>
            {
                _poolManager.DeactivateWholePool();
                GenerateLevel();
            });
        }
 private void OnInstaller(PickerBase pickerBase)
 {
     _pickerBase = pickerBase;
     Initialize();
 }