Beispiel #1
0
        private bool OnPlayerLoginRsp(PlayerLoginRsp rsp)
        {
            if (rsp.get_retcode() == null)
            {
                MonoTestUI sceneCanvas = Singleton <MainUIManager> .Instance.SceneCanvas as MonoTestUI;
                if (sceneCanvas.avatar3dModelContext != null)
                {
                    return(false);
                }
                sceneCanvas.MainCamera.SetActive(true);
                sceneCanvas.MainMenu_SpaceShip.SetActive(true);
                sceneCanvas.avatar3dModelContext = new Avatar3dModelContext(null);
                Singleton <MainUIManager> .Instance.ShowWidget(sceneCanvas.avatar3dModelContext, UIType.Root);

                GameObject            view         = GameObject.Find("MainMenu_SpaceShip");
                GameObject            uiMainCamera = GameObject.Find("MainCamera");
                SpaceShipModelContext widget       = new SpaceShipModelContext(view, uiMainCamera);
                Singleton <MainUIManager> .Instance.ShowWidget(widget, UIType.Any);

                GraphicsSettingData.ApplySettingConfig();
                AudioSettingData.ApplySettingConfig();
                this.TestCode(sceneCanvas);
            }
            else
            {
                GeneralDialogContext dialogContext = new GeneralDialogContext {
                    type  = GeneralDialogContext.ButtonType.SingleButton,
                    title = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0]),
                    desc  = LocalizationGeneralLogic.GetNetworkErrCodeOutput(rsp.get_retcode(), new object[0]),
                    notDestroyAfterTouchBG = true
                };
                Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
            }
            return(false);
        }
Beispiel #2
0
        public void Start()
        {
            Singleton <LevelManager> .Instance.InitAtStart();

            GraphicsSettingData.ApplySettingConfig();
            AudioSettingData.ApplySettingConfig();
        }
Beispiel #3
0
 private void RecoverOriginState()
 {
     AudioSettingData.ApplySettingConfig();
     AudioSettingData.CopyPersonalAudioConfig(ref this._modifiedSettingConfig);
     this.SetVolumeBtns(this.BGMVolumeBtns, (int)this._modifiedSettingConfig.BGMVolume);
     this.SetVolumeBtns(this.soundEffectVolumeBtns, (int)this._modifiedSettingConfig.SoundEffectVolume);
     this.SetVolumeBtns(this.voiceVolumeBtns, (int)this._modifiedSettingConfig.VoiceVolume);
     this.SetProcessPieces(this.BGMProcessPiecesGroups, (int)this._modifiedSettingConfig.BGMVolume);
     this.SetProcessPieces(this.soundEffectProcessPiecesGroups, (int)this._modifiedSettingConfig.SoundEffectVolume);
     this.SetProcessPieces(this.voiceProcessPiecesGroups, (int)this._modifiedSettingConfig.VoiceVolume);
     this.SetLanguageBtns();
 }
Beispiel #4
0
        public override void Start()
        {
            this.buildingDataDict             = new Dictionary <MonoIslandBuilding, CabinDataItemBase>();
            this.buildingDataDict[this.power] = Singleton <IslandModule> .Instance.GetCabinDataByType(1);

            this.buildingDataDict[this.collect] = Singleton <IslandModule> .Instance.GetCabinDataByType(3);

            this.buildingDataDict[this.misc] = Singleton <IslandModule> .Instance.GetCabinDataByType(4);

            this.buildingDataDict[this.mission] = Singleton <IslandModule> .Instance.GetCabinDataByType(5);

            this.buildingDataDict[this.kianaEnhance] = Singleton <IslandModule> .Instance.GetCabinDataByType(2);

            this.buildingDataDict[this.meiEnhance] = Singleton <IslandModule> .Instance.GetCabinDataByType(6);

            this.buildingDataDict[this.bronyaEnhance] = Singleton <IslandModule> .Instance.GetCabinDataByType(7);

            this.SetupBuildings();
            this.playerBar = new PlayerStatusWidgetContext();
            Singleton <MainUIManager> .Instance.ShowWidget(this.playerBar, UIType.Any);

            CabinDetailPageContext context = new CabinDetailPageContext(this.buildingDataDict[this.power], true)
            {
                EnableTutorial = false
            };

            Singleton <MainUIManager> .Instance.ShowPage(context, UIType.Page);

            context.Destroy();
            CabinOverviewPageContext context2 = new CabinOverviewPageContext(this.buildingDataDict[this.power], this.buildingDataDict)
            {
                EnableTutorial = false
            };

            Singleton <MainUIManager> .Instance.ShowPage(context2, UIType.Page);

            context2.Destroy();
            this.islandMainPage.SetActive(true);
            this.mainPageContext = new IslandMainPageContext(this.islandMainPage, this.buildingDataDict);
            Singleton <MainUIManager> .Instance.ShowPage(this.mainPageContext, UIType.Page);

            this.mainPageContext.view.name = "IslandMainPageContext";
            GraphicsSettingData.ApplySettingConfig();
            AudioSettingData.ApplySettingConfig();
            this.TriggerFullScreenBlock(false);
            Singleton <NotifyManager> .Instance.FireNotify(new Notify(NotifyTypes.DestroyLoadingScene, null));

            base.Start();
        }