Ejemplo n.º 1
0
 private static void ShiftGUI(int i)
 {
     if (GUIMain.onFadeBlackLoadScene != null)
     {
         GUIMain.onFadeBlackLoadScene();
         GUIMain.onFadeBlackLoadScene = null;
     }
     GUIFadeControll.ActionRestart();
 }
Ejemplo n.º 2
0
    public static void FadeBlackReqFromSceneForMulti(int startId, string screenName, float outSec = 0.5f, float inSec = 0.5f)
    {
        GUIMain.beforeGUIScreen = new Stack <string>();
        GUICollider.DisableAllCollider("GUIMain");
        Action actionReceived = null;
        bool   isResult       = false;

        if (screenName != null)
        {
            if (screenName == "UIResult" || screenName == "UIPvPResult")
            {
                isResult       = true;
                actionReceived = delegate()
                {
                    GUIFadeControll.ActionRestart();
                    GUIMain.OnNewScreenStart(screenName);
                };
                goto IL_D8;
            }
            if (!(screenName == "UIHome"))
            {
            }
        }
        inSec = 0f;
        RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
        actionReceived = delegate()
        {
            Loading.DisableMask();
            TipsLoading.Instance.StartTipsLoad(CMD_Tips.DISPLAY_PLACE.TitleToFarm, true);
            GUIFadeControll.LoadGUIAll();
        };
IL_D8:
        Time.timeScale = 1f;
        GUIFadeControll.SetLoadInfo(delegate(int x)
        {
            if (GUIMain.actCallBackBattle != null)
            {
                GUIMain.actCallBackBattle();
            }
            if (isResult)
            {
                Singleton <GUIMain> .instance.StartCoroutine(APIUtil.Instance().SendBattleResultForMulti(actionReceived, startId));
            }
            else
            {
                if (actionReceived != null)
                {
                    actionReceived();
                }
                ClassSingleton <QuestData> .Instance.ClearDNGDataCache();
            }
        }, "Empty", screenName, string.Empty, null, false);
        GUIFadeControll.SetFadeInfo(outSec, 0f, inSec, 1f);
        GUIManager.LoadCommonGUI("Effect/FADE_B", GUIMain.self.gameObject);
        GUIMain.backMode_ = true;
    }
Ejemplo n.º 3
0
 public static void FadeReqCutSceneEnd()
 {
     if (null != CutSceneMain.goGUI_CAM)
     {
         Camera component = CutSceneMain.goGUI_CAM.GetComponent <Camera>();
         component.depth   = 8f;
         component.enabled = true;
     }
     GUIFadeControll.ActionRestart();
 }
Ejemplo n.º 4
0
    public static void BackToTOP(string guiName = "UIStartupCaution", float outSec = 0.8f, float inSec = 0.8f)
    {
        ServerDateTime.isUpdateServerDateTime = false;
        GUIMain.self.StopAllCoroutines();
        if (null != ClassSingleton <FaceChatNotificationAccessor> .Instance.faceChatNotification)
        {
            ClassSingleton <FaceChatNotificationAccessor> .Instance.faceChatNotification.StopGetHistoryIdList();
        }
        ClassSingleton <GUIMonsterIconList> .Instance.PushBackAllMonsterPrefab();

        ClassSingleton <MonsterUserDataMng> .Instance.Initialize();

        ClassSingleton <GUIMonsterIconList> .Instance.AllDelete();

        GUIMain.DestroyAllDialog(null);
        GUIMain.onFadeBlackLoadScene = null;
        FarmSceneryCache.ClearCache();
        TutorialObserver tutorialObserver = UnityEngine.Object.FindObjectOfType <TutorialObserver>();

        if (null != tutorialObserver)
        {
            UnityEngine.Object.Destroy(tutorialObserver.gameObject);
        }
        TutorialUI tutorialUI = UnityEngine.Object.FindObjectOfType <TutorialUI>();

        if (null != tutorialUI)
        {
            if ("GUI" == tutorialUI.gameObject.name)
            {
                UnityEngine.Object.Destroy(tutorialUI);
                string[] array = new string[]
                {
                    "ROOT/Panel",
                    "ROOT/HitIcon",
                    "ROOT/HUD"
                };
                foreach (string name in array)
                {
                    GameObject gameObject = GameObject.Find(name);
                    if (null != gameObject)
                    {
                        UnityEngine.Object.Destroy(gameObject);
                    }
                }
            }
            else
            {
                UnityEngine.Object.Destroy(tutorialUI.gameObject);
            }
        }
        AppCoroutine appCoroutine = UnityEngine.Object.FindObjectOfType <AppCoroutine>();

        if (null != appCoroutine)
        {
            UnityEngine.Object.Destroy(appCoroutine.gameObject);
        }
        GUIMain.BarrierReset();
        Singleton <GUIManager> .Instance.UseOutsideTouchControl = false;
        FarmRoot instance = FarmRoot.Instance;

        if (null != instance)
        {
            InputControll input = instance.Input;
            if (null != input)
            {
                input.enabled = false;
            }
        }
        ClassSingleton <QuestData> .Instance.ClearWorldAreaMList();

        FarmCameraControlForCMD.ClearRefCT();
        GUICollider.DisableAllCollider("GUIMain");
        SoundMng.Instance().StopBGM(0.5f, delegate(int n)
        {
            if (GUIMain.gUIScreen != guiName)
            {
                Action <int> action = delegate(int x)
                {
                    GUIFadeControll.ActionRestart();
                };
                string guiName2      = guiName;
                Action <int> action_ = action;
                string aploadName_   = "Empty";
                string loadGUIName_  = guiName2;
                string empty         = string.Empty;
                if (GUIMain.< > f__mg$cache0 == null)
                {
                    GUIMain.< > f__mg$cache0 = new Action <int>(GUIMain.actCallBackBackToTOP);
                }
                GUIFadeControll.SetLoadInfo(action_, aploadName_, loadGUIName_, empty, GUIMain.< > f__mg$cache0, false);
                GUIFadeControll.SetFadeInfo(outSec, 0f, inSec, 1f);
                GUIManager.LoadCommonGUI("Effect/FADE_W", GUIMain.self.gameObject);
            }
        });
        GUIMain.nowBgm = string.Empty;
        Resources.UnloadUnusedAssets();
    }
Ejemplo n.º 5
0
    private IEnumerator StartEvent()
    {
        RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_OFF);
        ClassSingleton <MonsterUserDataMng> .Instance.Initialize();

        GUIMonsterIcon.InitMonsterGO(Singleton <GUIMain> .Instance.transform);
        ClassSingleton <GUIMonsterIconList> .Instance.Initialize();

        yield return(base.StartCoroutine(AssetBundleMng.Instance().WaitCacheReady()));

        yield return(base.StartCoroutine(StoreInit.Instance().InitStore()));

        this.googlePlay.Bootup();
        yield return(base.StartCoroutine(this.AuthLogin()));

        yield return(base.StartCoroutine(APIUtil.Instance().StartGameLogin()));

        if (DataMng.Instance().RespDataCM_Login == null)
        {
            SoundMng.Instance().PlayBGM("BGMInternal/bgm_103/sound", 0.3f, null);
            this.screenCollider.playOkSE = false;
            this.switchTitleImage(GUIScreenTitle.TitleStete.returnVal);
            RestrictionInput.EndLoad();
            GUIFadeControll.ActionRestart();
            yield break;
        }
        this.titleState = (GUIScreenTitle.TitleStete)DataMng.Instance().RespDataCM_Login.state;
        this.switchTitleImage(this.titleState);
        GUIFadeControll.ActionRestart();
        string responseContactCode = PlayerPrefs.GetString("InquiryCode", string.Empty);

        if (string.IsNullOrEmpty(responseContactCode))
        {
            GameWebAPI.RequestCM_InquiryCodeRequest requestCM_InquiryCodeRequest = new GameWebAPI.RequestCM_InquiryCodeRequest();
            requestCM_InquiryCodeRequest.OnReceived = delegate(GameWebAPI.InquiryCodeRequest response)
            {
                PlayerPrefs.SetString("InquiryCode", response.inquiryCode);
            };
            GameWebAPI.RequestCM_InquiryCodeRequest request = requestCM_InquiryCodeRequest;
            yield return(base.StartCoroutine(request.Run(null, null, null)));
        }
        this.userID.gameObject.SetActive(true);
        this.userCode.gameObject.SetActive(true);
        this.appVersion.gameObject.SetActive(true);
        this.buildNumLabel.gameObject.SetActive(true);
        this.NpVersion.gameObject.SetActive(true);
        this.userCode.text   = string.Format(StringMaster.GetString("TitleUserCode"), DataMng.Instance().RespDataCM_Login.playerInfo.userCode);
        this.appVersion.text = string.Format(StringMaster.GetString("TitleAppVersion"), VersionManager.version);
        GameWebAPI.RespDataCM_Login.TutorialStatus tutorialStatus = DataMng.Instance().RespDataCM_Login.tutorialStatus;
        if ("0" == tutorialStatus.endFlg && "0" == tutorialStatus.statusId)
        {
            this.cacheClearButtonCollider.enabled  = false;
            this.cacheClearButtonLabel.color       = Color.gray;
            this.cacheClearButtonLabel.effectColor = Color.gray;
            this.cacheClearButtonSprite.spriteName = "Common02_Btn_BaseG";
        }
        yield return(this.backup.CheckClearMissionForGoogle());

        if (GUICollider.IsAllColliderDisable())
        {
            GUICollider.EnableAllCollider(string.Empty);
        }
        RestrictionInput.EndLoad();
        if ("0" != tutorialStatus.endFlg)
        {
            CMD_BaseSelect.LoadSetting();
            CMD_ChipSortModal.LoadSetting();
        }
        yield break;
    }