Beispiel #1
0
        public override void OnClickButtonEvent(Transform button)
        {
            switch (button.name)
            {
            case "StatusButton":
                BaseScene.AddModalWindow <SoundSettingWindow>("StatusWindow");
                break;

            case "AreaHistoryButton":
                BaseScene.AddModalWindow <SoundSettingWindow>("AreaHistoryWindow");
                break;

            case "PrivacyPolicyButton":
                // ブラウザ起動
                Application.OpenURL(Entity.AppSettings.Instance.PrivacyPolicyURL);
                break;

            case "TermsOfUseButton":
                // ブラウザ起動
                Application.OpenURL(Entity.AppSettings.Instance.TermsOfUseURL);
                break;

            case "SoundButton":
                BaseScene.AddModalWindow <SoundSettingWindow>("SoundSettingWindow");
                break;

            case "CreditButton":
                BaseScene.AddModalWindow <CreditsWindow>("CreditsWindow");
                break;

            default:
                base.OnClickButtonEvent(button);
                break;
            }
        }
Beispiel #2
0
        public override void OnClickButtonEvent(Transform button)
        {
            switch (button.name)
            {
            case "NameChangeButton":
                var win = BaseScene.AddModalWindow <NameInputWindow, Argments>("NameInputWindow", new Argments(""));
                win.onEnd = SetData;
                break;

            case "AreaHistoryButton":
                BaseScene.AddModalWindow <AreaHistoryWindow>("AreaHistoryWindow");
                break;

            //case "HistoryBackButton":
            //    foreach (Transform tran in this.Content)
            //    {
            //        GameObject.Destroy(tran.gameObject);
            //    }
            //    this.History.gameObject.SetActive(false);
            //    break;
            case "ButtonClose":
                this.GetPanel().gameObject.SetActive(false);
                this.Close();
                break;

            default:
                base.OnClickButtonEvent(button);
                break;
            }
        }
Beispiel #3
0
        private void Awake()
        {
            // FIXME データを読み込むタイミング
            var result = PlayerDataManager.Load();

            if (!result)
            {
                // セーブデータが存在しない
                Debug.Log("New game!");
                // GPS使用の確認
                BaseScene.AddModalWindow <GpsWindow>("GpsWindow");
            }
            else
            {
                this.BaseScene.ChangeScene("Menu", 1.0f);
            }

            var data   = PlayerDataManager.PlayerData;
            var bgmMng = BgmManager.Instance;

            bgmMng.MasterVolume = data.BgmOn ? 1.0f : 0f;
            var seMng = SeManager.Instance;

            seMng.MasterVolume = data.SeOn ? 1.0f : 0f;
            bgmMng.Play(Sound.BgmKind.TOP, 0.0f, 0.0f, true, 1.0f);
        }
Beispiel #4
0
        public override void OnClickButtonEvent(Transform button)
        {
            switch (button.name)
            {
            case "StartButton":
                // レースボタンが押されたらメニューシーンに遷移
                Liver.RaceWindow.AnimalKind = (AnimalKind)Enum.Parse(typeof(AnimalKind), PlayerDataManager.PlayerData.LastSelectedAnimalId);
                this.BaseScene.ChangeScene("Race", 1.0f);
                break;

            case "AROW":
                // ブラウザ起動
                Application.OpenURL(Entity.AppSettings.Instance.ArowURL);
                break;

            case "Debug":
                // デバッグメニュー起動
                var setting = BaseScene.AddModalWindow <RaceDebugSetting>("RaceDebugSetting");
                break;

            default:
                base.OnClickButtonEvent(button);
                break;
            }
        }
Beispiel #5
0
        private void OnClickInformation(GameServer.RankingType kind)
        {
            var infoDat = Entity.InformationData.infoList[(int)kind];
            var dialog  = BaseScene.AddModalWindow <Liver.DialogWindow>("DialogWindow");

            dialog.SetDialog(infoDat.Title, infoDat.Title2, infoDat.Text, null, null, null);
        }
        public override void OnClickButtonEvent(Transform button)
        {
            switch (button.name)
            {
            case "OkButton":
                //Liver.RaceWindow.AnimalKind = this.animalKind;
                //BaseScene.AddModalWindow<Tsl.UI.Window, Argments>("RaceWindow", null);
                this.Close();
                break;

            case "BackButton":
                this.Close();
                break;

            case "Buy":
                var need   = AnimalSettings.Instance[animalKind].registCost;
                var has    = PlayerDataManager.PlayerData.StarNum;
                var dialog = BaseScene.AddModalWindow <DialogWindow>("DialogWindow");

                if (has >= need)
                {
                    // 解放確認
                    dialog.SetDialog("確認", "", string.Format("★{0}を使って解放します\nよろしいでしょうか", need), null,
                                     () =>
                    {
                        PlayerDataManager.PlayerData.SetStarNum(has - need);

                        if (PlayerDataManager.PlayerData.RegistAnimal(animalKind))
                        {
                            SetStar();
                            var tgl = animaltgls[animalKind];
                            tgl.AnimalTgl.onValueChanged.Invoke(true);
                            tgl.AnimalImg.color = Color.white;
                            tgl.Monitor.GetComponent <RawImage>().color = Color.white;
                            tgl.SelectIcon.gameObject.SetActive(false);
                        }

                        Mission.UnlockAnimalCar();
                        dialog.Close();
                    },
                                     () =>
                    {
                        dialog.Close();
                    });
                }
                else
                {
                    // 解放できない
                    dialog.SetDialog("確認", "", "スターが足りません。", () => { dialog.onClose(); }, null, null);
                }

                break;

            default:
                base.OnClickButtonEvent(button);
                break;
            }
        }
Beispiel #7
0
        public override void OnClickButtonEvent(Transform button)
        {
            switch (button.name)
            {
            case "OkButton":
                Debug.Log("OK");
                // 続いて名前入力画面
                BaseScene.AddModalWindow <NameInputWindow, Argments>("NameInputWindow", new Argments("new"));
                this.Close();
                break;

            default:
                base.OnClickButtonEvent(button);
                break;
            }
        }
Beispiel #8
0
        public override void OnClickButtonEvent(Transform button)
        {
            switch (button.name)
            {
            case "StopButton":
                if (GameObject.Find("PauseWindow(Clone)") == null)
                {
                    BaseScene.AddModalWindow <PauseWindow>("PauseWindow");
                }
                else
                {
                    GameObject.Find("PauseWindow(Clone)").transform.Find("Panel").gameObject.SetActive(true);
                }

                this.RaceArea.SetActive(false);
                var pause = GameObject.Find("PauseWindow(Clone)").GetComponent <PauseWindow>();
                pause.onClose = () =>
                {
                    this.RaceArea.SetActive(true);
                };
                pause.SetStatus(RaceWindow.AreaName, this.TotalDistance.text, this.TotalStar.text, "");
                break;

            case "Left":
                RaceArea.GetComponent <RaceArea>().BranchListChange(-1);
                break;

            case "Right":
                RaceArea.GetComponent <RaceArea>().BranchListChange(1);
                break;

            case "MinimapBase":
                // 北固定の切り替え
                this.minimapAutoDirection = !this.minimapAutoDirection;
                break;

            default:
                base.OnClickButtonEvent(button);
                break;
            }
        }
Beispiel #9
0
        public override void OnClickButtonEvent(Transform button)
        {
            switch (button.name)
            {
            case "ReStartButton":
                DrawCount();
                break;

            case "TopButton":
                var dialog = BaseScene.AddModalWindow <DialogWindow>("DialogWindow");
                dialog.CloseBtn.gameObject.SetActive(false);
                dialog.BtnPanel.gameObject.SetActive(true);
                dialog.SetDialog("TOPへ戻る", "", "スコアがリセットされます。\nよろしいですか?", null,
                                 () => { this.BaseScene.ChangeScene("Menu", 1.0f); }, () => { dialog.onClose(); });
                break;

            default:
                base.OnClickButtonEvent(button);
                break;
            }
        }
Beispiel #10
0
        private void GradeUp(PowerUpItem kind, bool isItem)
        {
            var dialog = BaseScene.AddModalWindow <DialogWindow>("DialogWindow");

            if (PlayerDataManager.PlayerData.StarNum >= (isItem ? this.itemNeedStar : this.openNeedStar))
            {
                dialog.SetDialog("確認", "", "よろしいですか?", null,
                                 () =>
                {
                    if (isItem)
                    {
                        Mission.GradeUpPowerUpItem(() =>
                        {
                            PlayerDataManager.PlayerData.StarNum -= this.itemNeedStar;
                            PlayerDataManager.PlayerData.SetPowerUpItemLevel(kind, PlayerDataManager.PlayerData.GetPoweUpItemLevel(kind) + 1);
                            //PlayerDataManager.Save();
                            MakeItemList();
                            dialog.onClose();
                        });
                    }
                    else
                    {
                        Mission.UnlockAnimalCar(() =>
                        {
                            PlayerDataManager.PlayerData.StarNum -= this.openNeedStar;
                            //PlayerDataManager.Save();
                            //MakeAnimalCarList();
                            dialog.onClose();
                        });
                    }
                }, () => { dialog.onClose(); });
            }
            else
            {
                dialog.SetDialog("確認", "", "スターが足りません。", () => { dialog.onClose(); }, null, null);
            }
        }
Beispiel #11
0
 // 結果表示
 public void DispResult(List <string> args)
 {
     BaseScene.AddModalWindow <ResultWindow, Window.Argments>("ResultWindow", new Window.Argments(args));
     this.RaceArea.SetActive(false);
 }