From 67ee17292855d8ce2e077bea2f86113adadf839c Mon Sep 17 00:00:00 2001
From: wangguan <wangguan@kt007.com>
Date: Wed, 16 Dec 2020 11:26:28 +0800
Subject: [PATCH] 修改编辑器模式下不走SDK流程 修改新手引导血条显示层级

---
 Assets/Scripts/Guide/GuidePanelNew.cs |   20 ++++++++++++++++++--
 Assets/Scripts/Guide/GuideCtrl.cs     |    2 +-
 Assets/Scenes/Loading.unity           |    6 +++---
 Assets/Scripts/Manager/ManagerRoot.cs |    6 ++++++
 4 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/Assets/Scenes/Loading.unity b/Assets/Scenes/Loading.unity
index f14c417..201fb0d 100644
--- a/Assets/Scenes/Loading.unity
+++ b/Assets/Scenes/Loading.unity
@@ -44511,7 +44511,7 @@
   m_Children:
   - {fileID: 1755399726}
   m_Father: {fileID: 0}
-  m_RootOrder: 6
+  m_RootOrder: 5
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
@@ -44559,7 +44559,7 @@
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 0}
-  m_RootOrder: 7
+  m_RootOrder: 6
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &475775423
 GameObject:
@@ -220790,7 +220790,7 @@
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 0}
-  m_RootOrder: 5
+  m_RootOrder: 7
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &1930105022
 GameObject:
diff --git a/Assets/Scripts/Guide/GuideCtrl.cs b/Assets/Scripts/Guide/GuideCtrl.cs
index 5e767ab..7639cc5 100644
--- a/Assets/Scripts/Guide/GuideCtrl.cs
+++ b/Assets/Scripts/Guide/GuideCtrl.cs
@@ -227,7 +227,7 @@
     private void KillDone()
     {
         string[] s2 = new string[] { allGuideDic[currentStep][2] };
-
+        panel.CloseSkillImage();
         panel.Step3(s2, OpenBoxFire);
     }
 
diff --git a/Assets/Scripts/Guide/GuidePanelNew.cs b/Assets/Scripts/Guide/GuidePanelNew.cs
index 3889b7b..acad04e 100644
--- a/Assets/Scripts/Guide/GuidePanelNew.cs
+++ b/Assets/Scripts/Guide/GuidePanelNew.cs
@@ -42,8 +42,10 @@
     //ParticleSystem finishPS;
     Button finishBtn;
     Image finishImg;
+    Canvas skillCanvasGroup;
     void Awake()
     {
+
         tmpMask = transform.GetComponent<Image>();
         tipsUI = transform.Find("Tips").gameObject;
         tipsUI.transform.SetAsLastSibling();//把tips放在最下面
@@ -345,7 +347,18 @@
         StopShowDragPath(true);
     }
 
-
+    /// <summary>
+    /// 关闭技能X1的显示优先级
+    /// </summary>
+    public void CloseSkillImage()
+    {
+        GameObject go1 = GameObject.Find("UICamera/BottomCanvas/Panel/Energy/FireSkillBg/SkillCount1");
+        if (go1 != null)
+        {
+            skillCanvasGroup = go1.GetComponent<Canvas>();
+            skillCanvasGroup.overrideSorting = false;
+        }
+    }
 
     /// <summary>
     ///  步骤3 :对话---出兵后杀光---对话---展示火鸡
@@ -617,6 +630,8 @@
     public void Step7Talk(string[] str, Action ac)
     {
         callBack = ac;
+        GameObject.Find("UICamera/MainUI/BloodUI").SetActive(false);
+
         SetGuideUI(true);
         StartShowWord(str, GuideEnergyUp);
     }
@@ -628,7 +643,6 @@
     /// </summary>
     public void GuideEnergyUp()
     {
-        GameObject.Find("UICamera/MainUI/BloodUI").SetActive(false);
         EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.GuideEnergyUp, 100);
 
         tmpMask.enabled = false;
@@ -677,6 +691,8 @@
 
     public void FinishGuide()
     {
+        if (skillCanvasGroup != null)
+            skillCanvasGroup.overrideSorting = true;
         towerBuyBtn.gameObject.SetActive(true);
     }
 
diff --git a/Assets/Scripts/Manager/ManagerRoot.cs b/Assets/Scripts/Manager/ManagerRoot.cs
index 8271377..400b5c1 100644
--- a/Assets/Scripts/Manager/ManagerRoot.cs
+++ b/Assets/Scripts/Manager/ManagerRoot.cs
@@ -15,6 +15,12 @@
             GameObject root = GameObject.Find("ManagerRoot");
             if (root == null)
             {
+                if (Application.platform == RuntimePlatform.WindowsEditor ||
+            Application.platform == RuntimePlatform.WindowsPlayer)
+                {
+                    GameConfig.useSDK = false;
+                }
+
                 DOTween.Init(true, true, LogBehaviour.Verbose).SetCapacity(200, 10);
 
                 root = new GameObject("ManagerRoot");

--
Gitblit v1.9.1