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()); } }
IEnumerator WaitClosed() { yield return(new WaitForSeconds(1.4f)); CameraPosChange.ChangeGameMain(); CampusBackGround.Enabled(); CampusTemplate.NonSelect(); ModeManager.ChangeGameMode(); CampusDes.Des(); BGM.Stop(); UIModeChanger.Enable(true); }
private void OnWinAccepted() { if (accepted) { return; } Debug.Log($"you win."); bgmManager.Stop(); sfxManager.Play(IngameSfxType.GameOver); Invoke("ready", 9.0f); accepted = true; }
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); } }
/// <summary> /// イベント開始 /// </summary> protected override void BeginEvent() { base.BeginEvent(); ///イベントの発生条件を書く CanStart = false; EventMngr.BeginEvent(OriginEventPrefab); BGM.Stop(); }
/// <summary> /// 移動スタート /// </summary> public void StartMove() { if (IsStart) { return; } BGM.Stop(); SEPlayer.Play(LeafsScatteredResName); IsStart = true; iTween.MoveTo(gameObject, iTween.Hash("path", iTweenPath.GetPath("MovePath"), "time", GoalTime, "easetype", iTween.EaseType.easeOutSine)); iTween.ValueTo(gameObject, iTween.Hash("from", 0, "to", 1, "time", FadeOutTime, "onupdate", "UpdateHandler")); }
private void OnRoundWinAccepted() { if (acceptedResult) { return; } director.PlayerWinsCounter.Increment(); bgmManager.Stop(); sfxManager.Play(IngameSfxType.GameOver); resetReadyFlags(); if (winsManager.Finished) { Invoke("win", 6.0f); } else { Invoke("ready", 9.0f); } acceptedResult = true; }
private void OnTriggerStay2D(Collider2D collision) { if (Input.GetKey(KeyCode.V)) { BGM.Stop(); this.gameObject.SetActive(true); StartCoroutine(TransferCoroutine()); } // if (collision.gameObject.name == "Player_Swordman") // { // StartCoroutine(TransferCoroutine()); // } }
private void gameover() { director.Floor.SetActive(false); bgmManager.Stop(); sfxManager.Play(IngameSfxType.GameOver); // TODO: 本番は常にセーブ var updated = highScore.UpdateValue(); if (updated) { saveRanking(); } Invoke("gamestart", 9.0f); }
public void Title() { SceneManager.LoadScene("Title"); theBGM.Stop(); }
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.Stop(); this.gameObject.SetActive(true); }
public void StopBGM() { theBGM.Stop(); }