Ejemplo n.º 1
0
    // this replaces Update method
    private IEnumerator RunSpawner()
    {
        // run this routine infinite
        while (waveOngoing)
        {
            state = SpawningState.Spawning;

            // do the spawning and at the same time wait until it's finished
            yield return(StartCoroutine(SpawnEnemies(waves[currentWave - 1], spawners)));

            state = SpawningState.NothingLeftToSpawn;

            // wait until all enemies died (are destroyed)
            yield return(new WaitWhile(() => enemiesInWave > 0));

            state = SpawningState.BetweenWaves;
        }
    }
 public bool IsSame(FSSSignal other)     // is this signal the same as the other one
 {
     return(SignalName.Equals(other.SignalName) && SpawningFaction.Equals(other.SpawningFaction) && SpawningState.Equals(other.SpawningState) &&
            USSType.Equals(other.USSType) && ThreatLevel == other.ThreatLevel && ClassOfSignal == other.ClassOfSignal &&
            (ClassOfSignal == Classification.Carrier || ExpiryUTC == other.ExpiryUTC));       // note carriers have our own expiry on it, so we don't
 }