void BGM() { if (wave == 1 || wave == 5 || wave == 9) { bgm.Stop(); bgm.Play(3); StartCoroutine(DelayFadeInOutCoroutine()); } else if (wave == 2 || wave == 6) { bgm.Stop(); bgm.Play(2); StartCoroutine(DelayFadeInOutCoroutine()); } else if (wave == 3 || wave == 7) { bgm.Stop(); bgm.Play(1); StartCoroutine(DelayFadeInOutCoroutine()); } else if (wave == 4 || wave == 8) { bgm.Stop(); bgm.Play(0); StartCoroutine(DelayFadeInOutCoroutine()); } else if (wave == 10) { bgm.Stop(); bgm.Play(Random.Range(0, 4)); StartCoroutine(DelayFadeInOutCoroutine()); } }
public void PushDown() { if (canPush && isInArea && !isPushing && !gameManager.IsPlayerDied && !gameManager.IsCreared) { //Debug.Log("引き寄せ開始"); mainHeartManager.CanAccel = true; lightning.isPlaying = true; lightning.EaseIn(0.25f); lightning.endPoint = this.transform.position; currentEndPos = this.transform.position; isPushing = true; //サウンド再生(すでに再生している場合はストップさせる) if (canMakeSound) { bgmManager.Stop(BGMPath.PULL_SOUND); bgmManager.FadeIn(BGMPath.PULL_SOUND, 1f); bgmManager.Play(BGMPath.PULL_SOUND, 0.4f, 0, 1, true); } //タッチ中のエフェクト再生 SetActivateTouchEffect(true); } }
IEnumerator Wait() { yield return(new WaitForSeconds(0.01f)); theVideo.Prepare(); WaitForSeconds waitTime = new WaitForSeconds(0.1f); while (!theVideo.isPrepared) { yield return(waitTime); } //rawImage.GetComponent<RawImage>().texture = texture; theVideo.Play(); BGM.Play(playMusicTrack); //yield return new WaitForSeconds(0.1f); yield return(new WaitUntil(() => theVideo.time >= 4f)); //CursorManager.instance.SetCursorState(2); //yield return new WaitForSeconds(4.2f); menu.SetActive(true); //animator.SetBool("Appear",true); //yield return new WaitForSeconds(1.5f); //animator.SetBool("Swing",true); // yield return new WaitForSeconds(15f); // theVideo.Pause(); }
public void Chap3_CutScene() { Player2.SetActive(false); Player1.SetActive(false); Chap_3_Image.SetActive(true); ClearCheck = true; BGM.Play(5); inGameCheck = false; }
public void ResetPos() { if (PS == PlayerState.Die) { reset.ResetObjects(); transform.position = SpawnPoint; if (BGM.bgmName != SpawnBGM) { BGM.Play(SpawnBGM); } camera.SaveZoomSet(); render.color = new Color(render.color.r, render.color.b, render.color.b, 1); rigidbody.simulated = true; DieEffect.SetActive(false); PS = PlayerState.Idle; reset.SetObjects(); ui.FadeOut(); ItemKeyDownCount = 0; CancelInvoke("ResetPos"); } }
void Update() { // ESCキー押した時にコンフィグ画面になっていなければ if (Input.GetKeyDown(KeyCode.Escape) && !isConfig) { //ポーズ中だったら何もしない if (isPause) { isPause = false; Tutorial.SetActive(false); Time.timeScale = 1f; bgmManager.Play(); //ポーズ画面でなかったらポーズ画面にする } else { isPause = true; Tutorial.SetActive(true); Time.timeScale = 0; bgmManager.Pause(); //一時停止(完全停止する場合はaudioSource.Stop(); } } // ポーズ中に左Shiftキー押したとき if (Input.GetKeyDown(KeyCode.LeftShift) && isPause) { //コンフィグ画面だったら何もしない if (isConfig) { isConfig = false; Setting.SetActive(false); //コンフィグ画面でなかったらコンフィグ画面にする } else { isConfig = true; Setting.SetActive(true); } } }
private void OnTriggerEnter2D(Collider2D collision) { BGM.Play(playTrack); this.gameObject.SetActive(false); }
public void waveStart(int wave) { playing = true; mCnt = 0; StartCoroutine(DelayFadeInOutCoroutine()); switch (wave) { case 1: bgm.Play(4); e_manage.GetComponent <e_Spawn>().set(10, new List <int> { 0, 1 }, 2.5f, 4.0f); break; case 2: bgm.Play(3); e_manage.GetComponent <e_Spawn>().set(20, new List <int> { 0, 1, 3 }, 2.0f, 3.5f); break; case 3: bgm.Play(2); e_manage.GetComponent <e_Spawn>().set(20, new List <int> { 0, 1, 3 }, 2.0f, 3.0f); m_manage.GetComponent <m_Spawn>().set(5, new List <int> { 0, 1, 3 }, 8.0f, 10.0f); break; case 4: bgm.Play(1); e_manage.GetComponent <e_Spawn>().set(20, new List <int> { 2, 4, 5 }, 2.0f, 3.0f); break; case 5: bgm.Play(4); e_manage.GetComponent <e_Spawn>().set(25, new List <int> { 2, 4, 5 }, 2.0f, 3.0f); m_manage.GetComponent <m_Spawn>().set(10, new List <int> { 2, 4, 5 }, 5.0f, 6.0f); break; case 6: bgm.Play(3); e_manage.GetComponent <e_Spawn>().set(10, new List <int> { 0, 1, 2, 3, 4, 5 }, 2.0f, 5.0f); m_manage.GetComponent <m_Spawn>().set(5, new List <int> { 2, 4, 5 }, 5.0f, 7.0f); d_manage.GetComponent <d_Spawn>().set(10, new List <int> { 2, 4, 5 }, 3.0f, 4.0f); break; case 7: bgm.Play(2); e_manage.GetComponent <e_Spawn>().set(20, new List <int> { 0, 1, 2, 3, 4, 5, 6 }, 2.0f, 3.0f); m_manage.GetComponent <m_Spawn>().set(20, new List <int> { 0, 1, 2, 3, 4, 5, 6 }, 2.0f, 3.0f); break; case 8: bgm.Play(1); d_manage.GetComponent <d_Spawn>().set(30, new List <int> { 0, 1, 2, 3, 4, 5, 6 }, 3.0f, 4.0f); break; case 9: bgm.Play(4); e_manage.GetComponent <e_Spawn>().set(15, new List <int> { 0, 1, 2, 3, 4, 5, 6 }, 2.0f, 7.0f); m_manage.GetComponent <m_Spawn>().set(15, new List <int> { 0, 1, 2, 3, 4, 5, 6 }, 2.0f, 7.0f); d_manage.GetComponent <d_Spawn>().set(15, new List <int> { 0, 1, 2, 3, 4, 5, 6 }, 2.0f, 7.0f); t_manage.GetComponent <t_Spawn>().set(5, new List <int> { 0, 1, 2, 3, 4, 5, 6 }, 10.0f, 15.0f); break; case 10: bgm.Play(Random.Range(1, 5)); e_manage.GetComponent <e_Spawn>().set(30, new List <int> { 0, 1, 2, 3, 4, 5, 6 }, 2.0f, 3.0f); m_manage.GetComponent <m_Spawn>().set(15, new List <int> { 0, 1, 2, 3, 4, 5, 6 }, 2.0f, 7.0f); d_manage.GetComponent <d_Spawn>().set(15, new List <int> { 0, 1, 2, 3, 4, 5, 6 }, 2.0f, 7.0f); t_manage.GetComponent <t_Spawn>().set(10, new List <int> { 0, 1, 2, 3, 4, 5, 6 }, 7.5f, 10.0f); break; default: playing = false; bgm.Stop(); break; } }
private void OnTriggerEnter2D(Collider2D collision) { BGM.Play(playMusicTrack); BGM.SetVolumn(0.15f); this.gameObject.SetActive(false); }
// Start is called before the first frame update void Start() { BGM = FindObjectOfType <BGMManager>(); BGM.Play(playMusicTrack); this.gameObject.SetActive(false); }
public void OnTriggerEnter2D(Collider2D collision) { BGM.Play(playMusicTrack); this.gameObject.SetActive(false); }
private void OnTriggerEnter2D(Collider2D collision) { BGM.Play(playMusicTrack); }
public void PlayBGM(int i) { theBGM.Play(i); }