Selaa lähdekoodia

top层级细分

zhaoyang 3 vuotta sitten
vanhempi
commit
38dc3a5da6

+ 4 - 1
GameClient/Assets/Game/HotUpdate/Constant/ConstSortingOrder.cs

@@ -3,6 +3,9 @@ namespace GFGGame
     public class ConstSortingOrder
     {
         public const int TOP = 99;
-        public const int Debug = 100;
+        public const int Guide = 100;
+        public const int Alert = 101;
+        public const int Debug = 102;
+        public const int Float = 103;
     }
 }

+ 16 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstViewLayer.cs

@@ -13,6 +13,22 @@ namespace GFGGame
         /// 最顶层
         /// </summary>
         public const string TOP = "TOP";
+        /// <summary>
+        ///引导层
+        /// </summary>
+        public const string GUIDE = "GUIDE";
+        /// <summary>
+        /// 提示层
+        /// </summary>
+        public const string ALERT = "ALERT";
+        /// <summary>
+        /// debug层
+        /// </summary>
+        public const string DEBUG = "DEBUG";
+        /// <summary>
+        /// 飘字层
+        /// </summary>
+        public const string FLOAT = "FLOAT";
 
     }
 }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Controller/PromptController.cs

@@ -56,7 +56,7 @@ namespace GFGGame
 
             // }
             ui = UI_FloatingTextPromptNarmalUI.Proxy().target;
-            ViewManager.AddChildToTopLayer(ui);
+            ViewManager.AddChildToFloatLayer(ui);
             GTextField textField = ui.GetChild("txtMessage") as GTextField;
             textField.text = message;
             if (_uis.Count <= 0)

+ 14 - 2
GameClient/Assets/Game/HotUpdate/Views/BaseView.cs

@@ -6,7 +6,7 @@ namespace GFGGame
     /// <summary>
     /// 非Window的界面都可以使用这个
     /// </summary>
-    public class BaseView: UIView
+    public class BaseView : UIView
     {
 
         /// <summary>
@@ -14,7 +14,7 @@ namespace GFGGame
         /// </summary>
         protected string layer { get; set; }
 
-         
+
         /// <summary>
         /// 打开界面
         /// </summary>
@@ -25,6 +25,18 @@ namespace GFGGame
                 case ConstViewLayer.TOP:
                     ViewManager.AddChildToTopLayer(viewCom);
                     break;
+                case ConstViewLayer.GUIDE:
+                    ViewManager.AddChildToTopLayer(viewCom);
+                    break;
+                case ConstViewLayer.ALERT:
+                    ViewManager.AddChildToAlertLayer(viewCom);
+                    break;
+                case ConstViewLayer.DEBUG:
+                    ViewManager.AddChildToGuideLayer(viewCom);
+                    break;
+                case ConstViewLayer.FLOAT:
+                    ViewManager.AddChildToFloatLayer(viewCom);
+                    break;
                 default:
                     ViewManager.AddChildToBottomLayer(viewCom);
                     break;

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Common/ModalStatusView.cs

@@ -14,7 +14,7 @@ namespace GFGGame
             base.OnInit();
             _ui = UI_ModalStatusUI.Create();
             viewCom = _ui.target;
-            layer = ConstViewLayer.TOP;
+            layer = ConstViewLayer.ALERT;
             isfullScreen = true;
         }
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Guide/GuideView.cs

@@ -37,7 +37,7 @@ namespace GFGGame
             packageName = UI_GuideUI.PACKAGE_NAME;
             _ui = UI_GuideUI.Create();
             this.viewCom = _ui.target;
-            this.layer = ConstViewLayer.TOP;
+            this.layer = ConstViewLayer.GUIDE;
             isfullScreen = true;
             _ui.m_rectFrameTemp.visible = false;
             _ui.m_rectFrame.target.visible = false;

+ 25 - 0
GameClient/Assets/Game/HotUpdate/Views/ViewManager.cs

@@ -14,7 +14,11 @@ namespace GFGGame
         private static Dictionary<string, UIView> _viewDic;
         private static GComponent _bottomLayer;
         private static GComponent _topLayer;
+        private static GComponent _guideLayer;
+        private static GComponent _alertLayer;
         private static GComponent _debugLayer;
+        private static GComponent _floatLayer;
+
         private static Dictionary<string, object[]> _goBackDatas = new Dictionary<string, object[]>();
 
         public static void Init()
@@ -32,9 +36,18 @@ namespace GFGGame
             //��ʼ����ͼ������
             _bottomLayer = CreateLayer("BottomLayer");
             _topLayer = CreateLayer("TopLayer");
+            _topLayer.sortingOrder = ConstSortingOrder.TOP;
+
+            _guideLayer = CreateLayer("GuideLayer");
+            _guideLayer.sortingOrder = ConstSortingOrder.Guide;
+
+            _alertLayer = CreateLayer("AlertLayer");
+            _alertLayer.sortingOrder = ConstSortingOrder.Alert;
             //debug层
             _debugLayer = CreateLayer("DebugLayer");
             _debugLayer.sortingOrder = ConstSortingOrder.Debug;
+            _floatLayer = CreateLayer("FloatLayer");
+            _floatLayer.sortingOrder = ConstSortingOrder.Float;
             SetMaskAlpha(0.6f);
         }
 
@@ -47,11 +60,23 @@ namespace GFGGame
         {
             _topLayer.AddChild(gObject);
         }
+        public static void AddChildToGuideLayer(GObject gObject)
+        {
+            _guideLayer.AddChild(gObject);
+        }
+        public static void AddChildToAlertLayer(GObject gObject)
+        {
+            _alertLayer.AddChild(gObject);
+        }
 
         public static void AddChildToDebugLayer(GObject gObject)
         {
             _debugLayer.AddChild(gObject);
         }
+        public static void AddChildToFloatLayer(GObject gObject)
+        {
+            _floatLayer.AddChild(gObject);
+        }
 
         /// <summary>
         /// ��ʾһ����ͼ