Пример #1
0
    public int GetNumberSpawnsInNextWave(PLESpawn spawn)
    {
        int numSpawnsInNextWave = 0;
        int currentIndex        = CurrentWaveIndex;
        int nextIndex           = currentIndex + 1;

        if (nextIndex > MaxWaveIndex && InfiniteWavesEnabled)
        {
            nextIndex = 0;
        }
        if (nextIndex <= MaxWaveIndex)
        {
            numSpawnsInNextWave = WorkingLevelData.NumSpawns(spawn.spawnType, nextIndex);
        }
        return(numSpawnsInNextWave);
    }
Пример #2
0
 public int GetMaxMinSpawnsAllowedCurrentInWave(PLESpawn spawn)
 {
     return
         (Mathf.Min(spawn.MaxPerWave - GetNumberSpawnsInNextWave(spawn),
                    WorkingLevelData.NumSpawns(spawn.spawnType, CurrentWaveIndex)));
 }
Пример #3
0
 public int NumberSpawnsInWave(SpawnType type, int waveIndex)
 {
     waveIndex = Mathf.Clamp(waveIndex, 0, MaxWaveIndex);
     return(WorkingLevelData.NumSpawns(type, waveIndex));
 }