Beispiel #1
0
 public static void FadeWhiteReqScreen(string screen, Action <int> act = null, float outSec = 0.8f, float inSec = 0.8f, bool isFadeIn = false)
 {
     GUICollider.DisableAllCollider("GUIMain");
     GUIFadeControll.SetLoadInfo(act, string.Empty, screen, string.Empty, null, isFadeIn);
     GUIFadeControll.SetFadeInfo(outSec, 0f, inSec, 1f);
     GUIManager.LoadCommonGUI("Effect/FADE_W", GUIMain.self.gameObject);
 }
Beispiel #2
0
    public static void FadeBlackLoadScene(string SceneName, float outSec = 0.5f, float inSec = 0.5f, bool destroyMonsterIcon = true, Action <int> actionEnd = null)
    {
        GUIMain.actCallBackBattle = null;
        if (destroyMonsterIcon)
        {
            ClassSingleton <GUIMonsterIconList> .Instance.AllDisable();

            ClassSingleton <GUIMonsterIconList> .Instance.AllDelete();
        }
        GUICollider.DisableAllCollider("GUIMain");
        if (GUIMain.< > f__mg$cache1 == null)
        {
            GUIMain.< > f__mg$cache1 = new Action <int>(GUIMain.ShiftGUI);
        }
        Action <int> action_      = GUIMain.< > f__mg$cache1;
        string       loadGUIName_ = "UIIdle";

        GUIFadeControll.SetLoadInfo(action_, SceneName, loadGUIName_, string.Empty, actionEnd, false);
        GUIFadeControll.SetFadeInfo(outSec, 0f, inSec, 1f);
        BattleStateManager.onAutoServerConnect = true;
        ServerDateTime.isUpdateServerDateTime  = false;
        ClassSingleton <PlayLimit> .Instance.UseTicketNumCont();

        ClassSingleton <PlayLimit> .Instance.UsePlayLimitNumCont();

        GUIManager.LoadCommonGUI("Effect/FADE_B", GUIMain.self.gameObject);
        Resources.UnloadUnusedAssets();
    }
Beispiel #3
0
 private static void ShiftGUI(int i)
 {
     if (GUIMain.onFadeBlackLoadScene != null)
     {
         GUIMain.onFadeBlackLoadScene();
         GUIMain.onFadeBlackLoadScene = null;
     }
     GUIFadeControll.ActionRestart();
 }
Beispiel #4
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;
    }
 private void Update()
 {
     if (!this.fadeEfcStart_)
     {
         this.fadeEfcBase_.efStart();
         this.fadeEfcStart_ = true;
     }
     if (!this.fadeEfcBase_.efIsEnd())
     {
         EFFECT_BASE_KEY_FRAME curFrameValue = this.fadeEfcBase_.getCurFrameValue();
         this.EfcColorW.a     = curFrameValue.col_a * GUIFadeControll.alphaScale;
         this.fadeImage.color = this.EfcColorW;
         if (!GUIFadeControll.actionStop)
         {
             this.fadeEfcBase_.efUpdate();
         }
         if (this.fadeEfcBase_.efGetCurKeyFrameIdx() == 1 && !this.isLoaded)
         {
             if (this.isBarrier)
             {
                 GUIManager.HideBarrier();
             }
             if (!GUIFadeControll.isExecuteFadeIn)
             {
                 if (GUIFadeControll.fadeAction != null)
                 {
                     GUIFadeControll.actionStop = true;
                     GUIFadeControll.fadeAction(0);
                 }
                 else
                 {
                     GUIFadeControll.LoadGUIAll();
                 }
             }
             else
             {
                 GUIFadeControll.actionStop = true;
                 if (GUIFadeControll.fadeAction != null)
                 {
                     GUIFadeControll.fadeAction(0);
                 }
                 GUIFadeControll.LoadGUIAll();
             }
             this.isLoaded = true;
         }
     }
     else
     {
         if (GUIFadeControll.fadeEndAction != null)
         {
             GUIFadeControll.fadeEndAction(0);
         }
         UnityEngine.Object.Destroy(base.gameObject);
         GUIFadeControll.fadeEnd = true;
     }
 }
 public static void FadeReqCutSceneEnd()
 {
     if (null != CutSceneMain.goGUI_CAM)
     {
         Camera component = CutSceneMain.goGUI_CAM.GetComponent <Camera>();
         component.depth   = 8f;
         component.enabled = true;
     }
     GUIFadeControll.ActionRestart();
 }
 public static void FadeReqCutScene(CutsceneDataBase cutsceneData, Action startSceneCallBack, Action endSceneCallBack, Action <int> endFadeInCallBack, float outSec = 0.5f, float inSec = 0.5f)
 {
     CutSceneMain.cs_startSceneCallBack = startSceneCallBack;
     GUIFadeControll.SetFadeInfo(outSec, 0f, inSec, 1f);
     if (CutSceneMain.< > f__mg$cache0 == null)
     {
         CutSceneMain.< > f__mg$cache0 = new Action <int>(CutSceneMain.ExecCutScene);
     }
     GUIFadeControll.SetLoadInfo(CutSceneMain.< > f__mg$cache0, string.Empty, string.Empty, string.Empty, endFadeInCallBack, false);
     CutSceneMain.cutscene = CutsceneFactory.Create(cutsceneData);
     GUIManager.LoadCommonGUI("Effect/FADE_B", GUIMain.GetOrthoCamera().gameObject);
 }
Beispiel #8
0
    protected override void WindowOpened()
    {
        base.WindowOpened();
        base.StopAllCoroutines();
        if (null != ClassSingleton <FaceChatNotificationAccessor> .Instance.faceChatNotification)
        {
            ClassSingleton <FaceChatNotificationAccessor> .Instance.faceChatNotification.StopGetHistoryIdList();
        }
        SoundMng.Instance().StopBGM(0.5f, null);
        GUIMain.ResetBGM();
        TutorialObserver tutorialObserver = UnityEngine.Object.FindObjectOfType <TutorialObserver>();

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

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

        if (appCoroutine != null)
        {
            UnityEngine.Object.Destroy(appCoroutine.gameObject);
        }
        FarmCameraControlForCMD.ClearRefCT();
        Resources.UnloadUnusedAssets();
        FarmCameraControlForCMD.Off();
        GUIMain.DestroyAllDialog(this);
        GUICollider.InitAllCollider();
        GUIMain.BarrierReset();
        Singleton <GUIManager> .Instance.UseOutsideTouchControl = false;
        FarmRoot farmRoot = UnityEngine.Object.FindObjectOfType <FarmRoot>();

        if (farmRoot != null)
        {
            UnityEngine.Object.Destroy(farmRoot.gameObject);
        }
        GUIFadeControll.StartFadeIn(1f);
        CMDWebWindow.DeleteWebView();
        GUIMain.ReqScreen("UIMaintenance", string.Empty);
    }
Beispiel #9
0
    public IEnumerator StartScreenFadeIn(Action finish = null)
    {
        GUIFadeControll.StartFadeIn(0f);
        GameObject    fadeObj       = GUIManager.LoadCommonGUI("Render2D/SquaresROOT", Singleton <GUIMain> .Instance.gameObject);
        SquaresEffect squaresEffect = fadeObj.GetComponent <SquaresEffect>();

        squaresEffect.Initialize();
        while (fadeObj != null)
        {
            yield return(null);
        }
        if (finish != null)
        {
            finish();
        }
        GUIScreenHome.isManualScreenFadeIn = false;
        yield break;
    }
Beispiel #10
0
    private IEnumerator InitSHowGUI()
    {
        yield return(base.StartCoroutine(this.PreloadSpawnMonsters()));

        this.InitAndSpawnOthers();
        GUIFadeControll.StartFadeIn(1f);
        RestrictionInput.EndLoad();
        int size  = 0;
        int count = AssetDataMng.Instance().GetDownloadAssetBundleCount(string.Empty, out size);

        this.DownloadConfirmation(size, false);
        while (!this.closeDownloadPopup)
        {
            yield return(null);
        }
        yield return(base.StartCoroutine(this.StartDownload(count)));

        base.StartCoroutine(this.EndAssetBundleDownload());
        yield break;
    }
Beispiel #11
0
        private static FadeController Create()
        {
            FadeController result     = null;
            GameObject     gameObject = Resources.Load <GameObject>("UICommon/Effect/FADE_W");

            if (null != gameObject)
            {
                GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(gameObject);
                gameObject2.transform.parent        = Singleton <GUIMain> .Instance.transform;
                gameObject2.transform.localPosition = new Vector3(0f, 0f, gameObject2.transform.localPosition.z);
                gameObject2.transform.localScale    = Vector3.one;
                gameObject2.transform.localRotation = Quaternion.identity;
                GUIFadeControll component = gameObject2.GetComponent <GUIFadeControll>();
                if (null != component)
                {
                    UnityEngine.Object.Destroy(component);
                }
                result           = gameObject2.AddComponent <FadeController>();
                gameObject2.name = "Fade";
            }
            return(result);
        }
Beispiel #12
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();
    }
 public static void ActionRestart()
 {
     GUIFadeControll.actionStop = false;
     GUIFadeControll.LoadGUIAll();
 }
Beispiel #14
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;
    }