Exemple #1
0
 private void Start()
 {
     StandardBehaviorEnemy = new List <GameObject> {
         cube_enemy, cylinder_enemy, cone_enemy, sphere_enemy
     };
     spawnInterval = ActiveLevelData.GetNewSpawnInterval(stepType);
     spawnPosY     = ScreenBorders.Top + ScreenBorders.Top / 10;
     positionArray = SpawnPositionCalculator();
 }
Exemple #2
0
 protected void BaseStart()
 {
     thisSetActive(buildIndex); //установка данной сцены активной методом из наследуемого класса
     ActiveLevelData.Set(currentLevelData);
     Player             = _Player_Assembler.Player_Creator(SceneController.lastForm);
     ScoreGainedOnLevel = new ScoreGainedOnLevel();
     if (ActiveLevelData.TimerIsNeeded)
     {
         localTimer.TurnOn();
     }
 }
Exemple #3
0
 void Update()
 {
     timeCount += Time.deltaTime;
     if (timeCount > spawnInterval)
     {
         Enemy_Spawner();
         ++EnemyCounter;
         timeCount = default;
         if (EnemyCounter >= ActiveLevelData.DifficultyIncreaseStep)
         {
             spawnInterval = ActiveLevelData.GetNewSpawnInterval(stepType, ActiveLevelData.SpawnIntervalStep);
             EnemyCounter  = default;
         }
         else
         {
             spawnInterval = ActiveLevelData.GetNewSpawnInterval(stepType);
         }
     }
 }