コード例 #1
0
ファイル: Level.cs プロジェクト: MelvinGr/Nebula
    public void OnWaveWiped(Wave sender)
    {
        if (bossActive)
        {
            return;
        }

        int index = waveList.IndexOf(sender);

        if (index >= 0)
        {
            waveList[index] = null;
        }

        if (WavesWiped)
        {
            if (config.wavesLoopCount > 0)
            {
                GameManager.timer.Add("Level-WaveLoader-" + config.wavesLoopCount, 4, false, false,
                                      delegate()
                {
                    SpawnEnemies(new Vector3(0, 0, GameManager.player.transform.position.z - 5));                            // +
                    //(sender.pattern == WavePatterns.Vertical || sender.pattern == WavePatterns.VerticalWave ? 5 : 0)));
                }
                                      );

                config.wavesLoopCount--;
            }
            else
            {
                if (guiScript != null)
                {
                    guiScript.SetNewBossNotificationEnabled(true, firstBoss);
                }

                firstBoss = false;

                SpawnBoss();
            }
        }
    }