Пример #1
0
        private void RhythmGameMusicSelect(RhythmGameMusicSelectMsg msg)
        {
            rhythmGameUI.SetActive(true);
            rhythmGameController.InitRhythmGameNote();
            nowCombo = 0;
            maxCombo = 0;
            perfect  = 0;
            good     = 0;
            normal   = 0;
            bad      = 0;
            score    = 0;
            SoundManager.Instance.PlaySound((int)SoundType.EFFECT_BTN_DOWN, mobileOptionModel.MobileOption.effectVolume);
            UI.IDialog.RequestDialogExit <UI.RhythmGameMusicSelectDialog>();
            UI.IDialog.RequestDialogEnter <UI.RhythmGameMainDialog>();
            Message.Send <RhythmGameSetMsg>(new RhythmGameSetMsg(playerInventoryModel.NowCharacter));
            SoundManager.Instance.PlaySound(msg.musicIndex, mobileOptionModel.MobileOption.gameVolume);

            Debug.Log("음악 번호 : " + msg.musicIndex);

            int aniNum = Random.Range((int)AnimationType.Motion1, (int)AnimationType.Motion2 + 1);

            Message.Send <SetCharacterAnimationMsg>(new SetCharacterAnimationMsg((AnimationType)aniNum, false));

            foreach (var o in ListRhythmGameMusic)
            {
                if (o.Index == msg.musicIndex)
                {
                    noteData = noteModel.GetNoteData(o.Title);
                    break;
                }
            }
            ListCorNote.Add(StartCoroutine(PlayNote()));
        }
Пример #2
0
        IEnumerator StartGaemDelay()
        {
            yield return(new WaitForSeconds(3.0f));

            rhythmGame_Controller.gameObject.SetActive(true);
            rhythmGame_Controller.InitRhythmGameNote();
            int num = UnityEngine.Random.Range(5, 10);

            RhythmGameMusicSelect(new RhythmGameMusicSelectMsg(num));
            settingModel.IsPlayGame = true;
        }