Esempio n. 1
0
        public void Reset(LevelType theLevelType, Byte theEnemySpawn, UInt16 minDelay, UInt16 maxDelay, Byte enemyTotal)
        {
            levelType     = theLevelType;
            maxEnemySpawn = theEnemySpawn;
            if (maxEnemySpawn > Constants.MAX_ENEMYS_SPAWN)
            {
                maxEnemySpawn = Constants.MAX_ENEMYS_SPAWN;
            }

            MinDelay = minDelay;
            MaxDelay = maxDelay;

            // Reset all enemies but not the list as will clear.
            for (Byte index = 0; index < maxEnemySpawn; index++)
            {
                EnemyList[index].Reset();
            }

            EnemyTest.Clear();
            EnemyDict.Clear();

            // Ensure total at least the max.
            if (enemyTotal < maxEnemySpawn)
            {
                enemyTotal = maxEnemySpawn;
            }
            EnemyTotal = enemyTotal;
            EnemySpawn = 0;
        }
Esempio n. 2
0
 public override void Init()
 {
     EnemyDict.Clear();
     foreach (EnemyBase enemy in EnemyList)
     {
         EnemyDict.Add(enemy.Id, enemy);
         CheckList(enemy.FearRaceList);
         CheckList(enemy.ResistRaceList);
     }
 }
Esempio n. 3
0
 public void Clear()
 {
     EnemyTest.Clear();
     EnemyDict.Clear();
 }