コード例 #1
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();
    }
コード例 #2
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);
 }
コード例 #3
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;
    }
コード例 #4
0
 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);
 }
コード例 #5
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();
    }