private IEnumerator OnRoleDeadIE(RoleCtrl role)
    {
        EazySoundManager.StopAllMusic(0.3f);
        GameStatus = GameStatus.Over;
        if (GlobalInit.Instance.CurRoleCtrl.CurPlatform == null || GlobalInit.Instance.CurRoleCtrl.CurPlatform.PlatfromType == PlatfromType.Hide)
        {
            yield return(new WaitForSeconds(0.5f));
        }
        else
        {
            if (GlobalInit.Instance.CurRoleCtrl.CurPlatform.PlatfromType == PlatfromType.HideTrap || GlobalInit.Instance.CurRoleCtrl.CurPlatform.PlatfromType == PlatfromType.OtherTrap)
            {
                //撞到障碍物,爆炸
                CameraCtrl.Instance.Shake();
                Destroy(GlobalInit.Instance.CurRoleCtrl.gameObject);
                yield return(new WaitForSeconds(1));
            }
        }
        int maxScore = PlayerPrefs.GetInt("MaxScore");

        if (Step > maxScore)
        {
            PlayerPrefs.SetInt("MaxScore", Step);
        }
        UIViewMgr.Instance.OpenView(UIViewType.GameLevelFail);
    }
Example #2
0
    public void SwitchToTracks()
    {
        var random = new System.Random();

        EazySoundManager.StopAllMusic(1f);
        EazySoundManager.PlayMusic(Tracks[random.Next(Tracks.Length - 1)]);
    }
        private IEnumerator OnRoleDeadIE()
        {
            m_Fire.StopMove();
            yield return(new WaitForSeconds(1));

            //打开失败界面
            EazySoundManager.StopAllMusic(1);
            UIViewMgr.Instance.OpenView(UIViewType.Fail);
        }
Example #4
0
 public void Stop()
 {
     EazySoundManager.StopAllMusic();
 }
Example #5
0
 public void StartFightMusic()
 {
     EazySoundManager.StopAllMusic();
     EazySoundManager.PlayMusic((AudioClip)Resources.Load("Sounds/backgroundmusic"), 1f, true, false, 0f, 0f);
 }