示例#1
0
    public void RefreshlistOpenUI(UIBase uibase0, bool isOpen)
    {
        if (uibase0 == null)
        {
            return;
        }
        if (uibase0.get_transform() == null)
        {
            return;
        }
        if (uibase0.get_transform().get_parent() != null && !UINodesManager.Is2DCanvasRoot(uibase0.get_transform().get_parent()))
        {
            return;
        }
        string prefabName = uibase0.prefabName;

        if (uibase0.uiDepth >= 14000)
        {
            return;
        }
        this.m_listOpenUI.Remove(uibase0);
        if (isOpen)
        {
            this.m_listOpenUI.Add(uibase0);
        }
        if (uibase0.GetIsIgnoreToSpine())
        {
            return;
        }
        EventDispatcher.Broadcast("UIManagerControl.ResetSpineRendering");
    }
示例#2
0
    public void HideAllExcept(params string[] exceptPrefabNames)
    {
        List <string> list;

        if (exceptPrefabNames != null && exceptPrefabNames.Length > 0)
        {
            list = new List <string>(exceptPrefabNames);
        }
        else
        {
            list = new List <string>();
        }
        for (int i = this.listBaseUI.get_Count() - 1; i >= 0; i--)
        {
            UIBase uIBase = this.listBaseUI.get_Item(i);
            if (uIBase != null && uIBase.isVisible && !list.Contains(uIBase.prefabName))
            {
                if (uIBase.get_transform() == null)
                {
                    uIBase.Show(false);
                }
                else if (UINodesManager.CheckParentIsCanvas(uIBase.get_transform().get_parent()))
                {
                    uIBase.Show(false);
                }
                else if (uIBase.prefabName == "LoadingUI" || uIBase.prefabName == "BattleLoading")
                {
                    uIBase.Show(false);
                }
            }
        }
    }
示例#3
0
 public void FakeHideAllUI(bool hide, int hide_nodes_2D = 7)
 {
     this.IsFakeHideAllUI = hide;
     UINodesManager.Show2DUI(!hide, hide_nodes_2D);
     UINodesManager.Show3DUI(!hide);
     EventDispatcher.Broadcast("UIManagerControl.FakeHideAllUI");
     EventDispatcher.Broadcast <bool>("ControlStick.ForbiddenStick", hide);
 }
示例#4
0
 public static void WinSetting(bool win)
 {
     if (win)
     {
         PetManager.Instance.DeleteScreenFXOfBattles();
         EntityWorld.Instance.ActSelf.IsDisplayingByLayer = true;
         Utils.SetCameraCullingMask(CamerasMgr.CameraMain, 5);
         UINodesManager.SetNoEventsUIRootByIsShow(false);
     }
     else
     {
         EntityWorld.Instance.ActSelf.IsDisplayingByLayer = false;
         Utils.SetCameraCullingMask(CamerasMgr.CameraMain, 1);
         UINodesManager.SetNoEventsUIRootByIsShow(true);
     }
 }
示例#5
0
    public void SetMainCameraEnable()
    {
        bool flag = true;

        for (int i = 0; i < this.listBaseUI.get_Count(); i++)
        {
            if (this.listBaseUI.get_Item(i) != null && this.listBaseUI.get_Item(i).isVisible&& this.listBaseUI.get_Item(i).get_gameObject().get_activeInHierarchy() && this.listBaseUI.get_Item(i).hideMainCamera)
            {
                flag = false;
                break;
            }
        }
        CamerasMgr.EnableCamera2Main(flag);
        SoundManager.TurnOnOff2Player(flag);
        UINodesManager.SetNoEventsUIRootByMainCamera(flag);
    }
示例#6
0
 private static void SetNoEventsUIRoot()
 {
     if (UINodesManager.NoEventsUIRoot_MainCamera && UINodesManager.NoEventsUIRoot_IsShow)
     {
         if (UINodesManager.cs_NoEventsUIRoot != null)
         {
             UINodesManager.cs_NoEventsUIRoot.set_enabled(true);
         }
         UINodesManager.ShowCanvasInNoEvent(true);
     }
     else
     {
         if (UINodesManager.cs_NoEventsUIRoot != null)
         {
             UINodesManager.cs_NoEventsUIRoot.set_enabled(false);
         }
         UINodesManager.ShowCanvasInNoEvent(false);
     }
 }
示例#7
0
 public static void SetCameraToStoryboard(bool bStoryboard)
 {
     EventDispatcher.Broadcast <bool>(ShaderEffectEvent.CAMERA_IN_STORY, bStoryboard);
     if (bStoryboard)
     {
         UINodesManager.SetUICanvas3D(CamerasMgr.Camera2Storyboard);
         CamerasMgr.SetCameraStoryboard(CamerasMgr.Camera2Storyboard);
         CamerasMgr.Camera2Storyboard.set_enabled(true);
         Utils.SetCameraCullingMask(CamerasMgr._Camera2Storyboard, 4);
         Utils.SetCameraCullingMask(CamerasMgr.CameraMain, 3);
     }
     else
     {
         UINodesManager.SetUICanvas3D(CamerasMgr.CameraMain);
         if (CamerasMgr._Camera2Storyboard != null)
         {
             CamerasMgr._Camera2Storyboard.set_enabled(false);
         }
         Utils.SetCameraCullingMask(CamerasMgr.CameraMain, 1);
     }
 }
示例#8
0
 public static void Show2DUI(bool isShow, int hide_nodes = 0)
 {
     UINodesManager.NoEventsUIRoot_IsShow = isShow;
     if (isShow)
     {
         UINodesManager.SetNoEventsUIRootByIsShow(true);
         UINodesManager.cs_NormalUIRoot.set_enabled(true);
         UINodesManager.cs_MiddleUIRoot.set_enabled(true);
         UINodesManager.cs_TopUIRoot.set_enabled(true);
         UINodesManager.cs_T2RootOfSpecial.set_enabled(true);
         UINodesManager.cs_T3RootOfSpecial.set_enabled(true);
     }
     else
     {
         if (UINodeBit.IsContainNode(hide_nodes, 1))
         {
             UINodesManager.SetNoEventsUIRootByIsShow(false);
         }
         if (UINodeBit.IsContainNode(hide_nodes, 2))
         {
             UINodesManager.cs_NormalUIRoot.set_enabled(false);
         }
         if (UINodeBit.IsContainNode(hide_nodes, 4))
         {
             UINodesManager.cs_MiddleUIRoot.set_enabled(false);
         }
         if (UINodeBit.IsContainNode(hide_nodes, 8))
         {
             UINodesManager.cs_TopUIRoot.set_enabled(false);
         }
         if (UINodeBit.IsContainNode(hide_nodes, 16))
         {
             UINodesManager.cs_T2RootOfSpecial.set_enabled(false);
         }
         if (UINodeBit.IsContainNode(hide_nodes, 32))
         {
             UINodesManager.cs_T3RootOfSpecial.set_enabled(false);
         }
     }
 }
示例#9
0
 public void HideAll()
 {
     for (int i = this.listBaseUI.get_Count() - 1; i >= 0; i--)
     {
         UIBase uIBase = this.listBaseUI.get_Item(i);
         if (uIBase != null && uIBase.isVisible)
         {
             if (uIBase.get_transform() == null)
             {
                 uIBase.Show(false);
             }
             else if (UINodesManager.CheckParentIsCanvas(uIBase.get_transform().get_parent()))
             {
                 uIBase.Show(false);
             }
             else if (uIBase.prefabName == "LoadingUI" || uIBase.prefabName == "BattleLoading")
             {
                 uIBase.Show(false);
             }
         }
     }
 }
示例#10
0
    public static void InitUICanvas()
    {
        if (UINodesManager.UIRoot == null)
        {
            return;
        }
        if (UINodesManager.m_NoEventsUIRoot != null)
        {
            return;
        }
        GameObject gameObject = AssetLoader.LoadAssetNow("Reserved/UICanvasNoEvents", typeof(Object)) as GameObject;

        if (gameObject == null)
        {
            Debug.LogError("prefabNoEvents初始化失败");
            return;
        }
        UINodesManager.m_NoEventsUIRoot = UGUITools.AddChild(UINodesManager.UIRoot.get_gameObject(), gameObject, false, "UICanvasNoEvents").get_transform();
        UINodesManager.m_NoEventsUIRoot.SetSiblingIndex(UINodesManager.NormalUIRoot.GetSiblingIndex());
        GameObject gameObject2 = AssetLoader.LoadAssetNow("Reserved/UICanvasEvents", typeof(Object)) as GameObject;

        if (gameObject2 == null)
        {
            Debug.LogError("prefabEvents初始化失败");
            return;
        }
        UINodesManager.m_MiddleUIRoot = UGUITools.AddChild(UINodesManager.UIRoot.get_gameObject(), gameObject2, false, "UICanvasMiddle").get_transform();
        UINodesManager.m_TopUIRoot    = UGUITools.AddChild(UINodesManager.UIRoot.get_gameObject(), gameObject2, false, "UICanvasTop").get_transform();
        UINodesManager.m_T2Root       = UGUITools.AddChild(UINodesManager.UIRoot.get_gameObject(), gameObject2, false, "UICanvasT2OfSpeical").get_transform();
        UINodesManager.m_T3Root       = UGUITools.AddChild(UINodesManager.UIRoot.get_gameObject(), gameObject2, false, "UICanvasT3OfSpecial").get_transform();
        UINodesManager.m_T4Root       = UGUITools.AddChild(UINodesManager.UIRoot.get_gameObject(), gameObject2, false, "UICanvasT4OfSpecial").get_transform();
        UINodesManager.SetUICanvas2Ds();
        UINodesManager.SetUICanvas3D(CamerasMgr.CameraMain);
        UINodesManager.Show3DUI(true);
        UINodesManager.SetUICamera();
    }
示例#11
0
 public static void SetNoEventsUIRootByIsShow(bool isShow)
 {
     UINodesManager.NoEventsUIRoot_IsShow = isShow;
     UINodesManager.SetNoEventsUIRoot();
 }
示例#12
0
 public static void SetNoEventsUIRootByMainCamera(bool isShow)
 {
     UINodesManager.NoEventsUIRoot_MainCamera = isShow;
     UINodesManager.SetNoEventsUIRoot();
 }
示例#13
0
    private void Awake()
    {
        if (!Application.get_isEditor() && File.Exists(AppConst.IsDebugFilePath))
        {
            GameManager.IsDebug = true;
        }
        if (Debug.get_isDebugBuild())
        {
            ProfilerWrap.InitPool();
        }
        Singleton <EditorConfig> .S.Init();

        Debug.Log("GameManager Awake");
        GameManager.Instance = this;
        Application.set_runInBackground(true);
        if (AppConst.UseAssetBundle)
        {
            Action <string> loadFailed = null;
            if (!Singleton <SwitchFile> .S.IsFileExist(SwitchFile.FileName.ABCheck))
            {
                RuntimePlatform platform = Application.get_platform();
                switch (platform)
                {
                case 7:
                    loadFailed = new Action <string>(this.OnAssetBundleLoadFailed);
                    goto IL_152;

                case 8:
                case 11:
                    goto IL_152;

                case 9:
                case 10:
IL_A0:
                    if (platform != 2)
                    {
                        goto IL_152;
                    }
                    loadFailed = new Action <string>(this.OnAssetBundleLoadFailed);
                    if (this.ExtendFiles == null)
                    {
                        this.ExtendFiles = new HashSet <string>();
                        string text = PathUtil.Combine(new string[]
                        {
                            Application.get_streamingAssetsPath(),
                            PathSystem.SubPackageInfoFile.ExtendList
                        });
                        Debug.LogFormat("extendList :{0}", new object[]
                        {
                            text
                        });
                        string[] array  = File.ReadAllLines(text);
                        string[] array2 = array;
                        for (int i = 0; i < array2.Length; i++)
                        {
                            string text2 = array2[i];
                            this.ExtendFiles.Add(text2);
                        }
                    }
                    goto IL_152;
                }
                goto IL_A0;
            }
            loadFailed = new Action <string>(this.OnAssetBundleLoadFailed);
IL_152:
            AssetBundleLoader.Instance.Initialize(loadFailed);
        }
        CamerasMgr.InitMainCamera();
        UINodesManager.InitUICanvas();
        this.Init();
    }