Пример #1
0
        public void Setup(StageMaster master)
        {
            DispatchEvent <Action <UI.StageCanvas> >(StageEvents.RequestStageCanvas, c => _stageCanvas             = c);
            DispatchEvent <Action <CharacterManager> >(StageEvents.RequestCharacterManager, c => _characterManager = c);
            _stageMaster = master;

            CreateGround(master.RoundSettings, () => CurrentGround.ActivationWalls(true));

            StartStage();
        }
Пример #2
0
        private void StartRound()
        {
            _grounds.ForEach(c => c.CloseAllExit());
            _grounds.ForEach(c => c.ActivationWalls(false));
            CurrentGround.ActivationWalls(true);

            _characterManager.ClearEnemies();
            if (Player == null)
            {
                _characterManager.CreateNewPlayer(_playerParent, OnCreatePlayer);
            }

            _bornEnemyLoopCoroutine = StartCoroutine(BornEnemyLoop());

            Player.SetCanMove(true);

            _stageCanvas.RoundTimer.StartTimer(3, OnEndTimer);
        }