Exemplo n.º 1
0
        public void SendToGame()
        {
            string sPath = GamePath.SongPath();

            DataSender.GetSongData(titleText.text, titleText.text, LevelText[LevelIndex], sPath, CurrentBeatmaps[CurrentIndex].FilePath, CurrentBeatmaps[CurrentIndex].WavPath, CurrentBeatmaps[CurrentIndex].Mp3Path, CurrentBeatmaps[CurrentIndex].OggPath, BGAPath, BackPath);
            DataSender.GetGameOptionData(autoPlay, noMusic, defBGA, randWave, mirror, curScrollVal, CurBGAVal);
            DataSender.SetNotemapMode((NotemapMode)CurrentBeatmaps[CurrentIndex].FormatMode); // FormatMode - 0: TW5, 1: SSTrain, 2: Deleste, 3: TW2, 4: TW4, 5: TW6, 6: TW1
            if (CurrentBeatmaps[CurrentIndex].FormatMode.Equals(3))
            {
                if (PlayerPrefs.HasKey("theater2") && PlayerPrefs.GetInt("theater2").Equals(0))
                {
                    changer.ChangeToScene("2LTheaterP", 0.5f);
                }
                else
                {
                    changer.ChangeToScene("6LineGame", 0.5f);
                }
            }
            else
            {
                changer.ChangeToScene("6LineGame", 0.5f);
            }
        }
Exemplo n.º 2
0
        public void SearchLoad(Text searchText)
        {
            string value = searchText.text;

            lastButtonIdx = -1;

            if (buttons.Count > 0)
            {
                for (int i = 0; i < buttons.Count; i++)
                {
                    buttons[i].SetActive(false);
                }
                buttons.Clear();
            }
            DirectoryInfo source = new DirectoryInfo(GamePath.SongPath());

            DirectoryInfo[] dir = source.GetDirectories();
            if (dir.Length.Equals(0))
            {
                ErrorManager.showErrorText(errorText.gameObject, ErrorMode.NoSong);
                return;
            }

            List <string> list = new List <string>();

            for (int i = 0; i < dir.Length; i++)
            {
                list.Add(dir[i].Name);
            }
            list.Sort();

            int chk; // 악곡 데이터가 정상적으로 입력되었는지를 알려주는 값.

            foreach (string dat in list)
            {
                GameObject go = Instantiate(listButton) as GameObject;
                go.SetActive(true);
                SongButton realBtn = go.GetComponent <SongButton>();
                chk = realBtn.SetSongName(dat, source.FullName + dat, value);
                //chk = realBtn.SetSong(dat, source.FullName + dat, value);                // 이거를 버튼 눌렀을 때로도 뺀다.
                realBtn.Index = buttons.Count;

                if (chk.Equals(1))
                {
                    go.SetActive(false); continue;
                }
                else if (chk.Equals(-1))
                {
                    if (!ErrorInfo.activeSelf)
                    {
                        ErrorInfo.SetActive(true);
                    }
                    ErrorDirList.Add(dat);
                }
                //여기까지
                go.transform.SetParent(listButton.transform.parent);
                go.transform.localScale = new Vector3(1, 1, 1); // 해상도에 따른 조정
                buttons.Add(go);
            }

            if (buttons.Count >= 30 && !ErrorInfo.activeSelf)
            {
#if UNITY_ANDROID
                if (Social.localUser.authenticated)
                {
                    PlayGamesPlatform.Instance.ReportProgress(GPGSIds.achievement_pride_of_the_rich, 100.0f, null);
                }
#elif UNITY_IOS
                Achievementer.ReportProgress("prideoftherich");
#endif
            }
        }