public void PlayerHit() { Debug.Log("被弾!"); RemainLife -= 1; lifetext.text = "LIFE:" + RemainLife.ToString(); if (RemainLife == 0) { WaveClear(); } }
public void WaveStartUp(string Wave) { switch (Wave) { case "normal": WaveStart(WaveState.NormalWave); break; case "hard": WaveStart(WaveState.HardWave); break; case "master": WaveStart(WaveState.MasterWave); break; } Debug.Log("ウェーブ起動"); Initialize(); //ウェーブ起動 // BGMSource.clip = BGMs[1]; BGMSource.Play(); MainUI.SetActive(false); RankingUI.SetActive(false); DifficultyUI.SetActive(false); SettingPanel.SetActive(false); WaveUI.SetActive(true); RightPointer.enabled = false; LeftPointer.enabled = false; Rightgun.ShotPos.GetChild(0).gameObject.SetActive(false); LeftGun.ShotPos.GetChild(0).gameObject.SetActive(false); if (_wavestate == WaveState.NormalWave) { Rightgun.SSwitch = true; LeftGun.SSwitch = true; RemainLife = 3; BULLETTIME.Bswitch = true; lifetext.text = "LIFE:" + RemainLife.ToString(); } else if (_wavestate == WaveState.HardWave) { Rightgun.SSwitch = true; LeftGun.SSwitch = true; RemainLife = 3; BULLETTIME.Bswitch = false; lifetext.text = "LIFE:" + RemainLife.ToString(); } else if (_wavestate == WaveState.MasterWave) { //Gunで盾オフにする Rightgun.SSwitch = false; LeftGun.SSwitch = false; RemainLife = 1; BULLETTIME.Bswitch = false; lifetext.text = "LIFE:" + RemainLife.ToString(); } waveing = true; //UIいろいろ表示 }