// Update is called once per frame void Update() { bool flag = false; // 敵の検索 foreach (Transform enemy in gameObject.transform) { flag = true; } // 敵がいなかった場合 if (!flag) { // ボスウェーブの場合 if (!nextWave) { battleSoundManager.StopSound(BattleSoundManager.Type.BattleBGM); gameTime.IsResult(true); } else { if (nextWave) { fontWave.NextWave(nextWave); } } this.gameObject.SetActive(false); } }
// Use this for initialization void Start() { battleSoundManager = GameObject.Find("BattleSoundManager").GetComponent <BattleSoundManager>(); battleSoundManager.StopSound(BattleSoundManager.Type.BossBGM); battleSoundManager.PlaySound(BattleSoundManager.Type.GameOver, true); image = GetComponent <Image>(); image.color = new Color(1, 1, 1, alpha); blur.isBlur(); }
public void NextWave(GameObject nextWave) { nextWaveBuf = nextWave; // フラグにVisibleのフラグを立てる bitFlag |= BitFlag.Visible; alpha = 0.0f; upDownFlashAlphaBuf = -upDownFlashAlpha; wave++; nextWave.GetComponent <Wave>().fontWave = this; if (!nextWave.GetComponent <Wave>().nextWave) { // フラグにBossのフラグを立てる bitFlag |= BitFlag.Boss; battleSoundManager.StopSound(BattleSoundManager.Type.BattleBGM); battleSoundManager.PlaySound(BattleSoundManager.Type.BossBGM); } }