Browse Source

添加关卡特效

zhaoyang 3 years ago
parent
commit
4c3f4c45f9

+ 2 - 1
FGUIProject/assets/Main/componentsLevel/CompStoryLevelItem.xml

@@ -6,6 +6,7 @@
       <relation target="n1_xuzk" sidePair="center-center,middle-middle"/>
     </text>
     <component id="n3_xuzk" name="flower" src="s2cc5l" fileName="components/CompFlower2.xml" xy="23,116"/>
-    <image id="n8_nmnb" name="iconUnPass" src="v35420" fileName="imagesStory/zx_gka_guang.png" xy="-29,-24"/>
+    <image id="n8_nmnb" name="iconUnPass" src="v35420" fileName="imagesStory/zx_gka_guang.png" xy="-29,-24" visible="false"/>
+    <graph id="n9_tt1q" name="holder" xy="67,72" size="1,1"/>
   </displayList>
 </component>

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_CompStoryLevelItem.cs

@@ -11,6 +11,7 @@ namespace UI.Main
         public GTextField m_txtOrder;
         public UI_CompFlower2 m_flower;
         public GImage m_iconUnPass;
+        public GGraph m_holder;
         public const string URL = "ui://mfvz4q8kxuzk2d";
         public const string PACKAGE_NAME = "Main";
         public const string RES_NAME = "CompStoryLevelItem";
@@ -62,6 +63,7 @@ namespace UI.Main
             m_txtOrder = (GTextField)comp.GetChild("txtOrder");
             m_flower = (UI_CompFlower2)UI_CompFlower2.Create(comp.GetChild("flower"));
             m_iconUnPass = (GImage)comp.GetChild("iconUnPass");
+            m_holder = (GGraph)comp.GetChild("holder");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -70,6 +72,7 @@ namespace UI.Main
             m_flower.Dispose();
             m_flower = null;
             m_iconUnPass = null;
+            m_holder = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 15 - 2
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryChapterView.cs

@@ -2,6 +2,8 @@ using FairyGUI;
 using UI.CommonGame;
 using UI.Main;
 using System.Collections.Generic;
+using UnityEngine;
+
 namespace GFGGame
 {
     public class StoryChapterView : BaseView
@@ -13,6 +15,9 @@ namespace GFGGame
         private GObject _unPasslevelItem;
         private GObject _endLevelItem;
 
+        private GameObject _effectObj;
+        private GoWrapper _wrapper;
+
         public override void Dispose()
         {
             if (_valueBarController != null)
@@ -145,10 +150,18 @@ namespace GFGGame
                                 levelItem.m_flower.target.visible = false;
 
                             }
-                            levelItem.m_iconUnPass.visible = !StoryDataManager.CheckLevelPass(_chapterID, level);
-                            if (levelItem.m_iconUnPass.visible)
+                            // levelItem.m_iconUnPass.visible = 
+                            levelItem.m_holder.visible = !StoryDataManager.CheckLevelPass(_chapterID, level);
+                            // if (levelItem.m_holder.visible)
+                            // {
+                            // }
+                            if (levelItem.m_holder.visible)
                             {
                                 _unPasslevelItem = levelItem.target;
+                                _effectObj = null;
+                                _wrapper = null;
+                                string resPath = ResPathUtil.GetViewEffectPath("ui_gk", "ui_gk_sg");
+                                SceneController.AddObjectToView(_effectObj, _wrapper, levelItem.m_holder, resPath, out _effectObj, out _wrapper);
                             }
                             if (level > endLevel)
                             {

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -235,10 +235,10 @@ namespace GFGGame
                 isOpen = false;
 
             });
-            List<string> list = new List<string>();
-            list.Add("GFGGame.ClothingShopView");
-            list.Add("GFGGame.LuckyBoxView");
-            ViewManager.Show<FunctionOpenView>(list);
+            // List<string> list = new List<string>();
+            // list.Add("GFGGame.ClothingShopView");
+            // list.Add("GFGGame.LuckyBoxView");
+            // ViewManager.Show<FunctionOpenView>(list);
         }
 
 

BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes