Pārlūkot izejas kodu

获得套装部件特效

zhaoyang 3 gadi atpakaļ
vecāks
revīzija
7997ec7f31

+ 1 - 0
FGUIProject/assets/CommonGame/GetSuitItemUI.xml

@@ -7,6 +7,7 @@
     <image id="n5_tu96" name="n5" src="tu965i" fileName="images/cj_liangguang.png" xy="48,436">
       <relation target="" sidePair="center-center,middle-middle"/>
     </image>
+    <graph id="n12_ox5b" name="holderEffect" xy="535,1150" pivot="0.5,0.5" size="10,10" touchable="false"/>
     <graph id="n7_tu96" name="holder" xy="393,683" pivot="0.5,0.5" size="394,268" touchable="false">
       <relation target="" sidePair="center-center,middle-middle"/>
     </graph>

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_GetSuitItemUI.cs

@@ -8,6 +8,7 @@ namespace UI.CommonGame
     {
         public GComponent target;
         public GLoader m_bg;
+        public GGraph m_holderEffect;
         public GGraph m_holder;
         public GTextField m_txtName;
         public GProgressBar m_probar;
@@ -60,6 +61,7 @@ namespace UI.CommonGame
         private void Init(GComponent comp)
         {
             m_bg = (GLoader)comp.GetChild("bg");
+            m_holderEffect = (GGraph)comp.GetChild("holderEffect");
             m_holder = (GGraph)comp.GetChild("holder");
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_probar = (GProgressBar)comp.GetChild("probar");
@@ -68,6 +70,7 @@ namespace UI.CommonGame
         public void Dispose(bool disposeTarget = false)
         {
             m_bg = null;
+            m_holderEffect = null;
             m_holder = null;
             m_txtName = null;
             m_probar = null;

+ 8 - 1
GameClient/Assets/Game/HotUpdate/Views/CommonGame/GetSuitItemVIew.cs

@@ -12,6 +12,8 @@ namespace GFGGame
         private GameObject _scenePrefab;
         private GameObject _sceneObject;
         private GoWrapper _wrapper;
+        private GameObject _gameObject1;
+        private GoWrapper _wrapper1;
 
         private int guideId = 0;//0:没有引导 1:首次获得套装2:首次获得套装部件
         public override void Dispose()
@@ -21,6 +23,8 @@ namespace GFGGame
                 GameObject.Destroy(_scenePrefab);
                 _scenePrefab = null;
             }
+            SceneController.DestroyObjectFromView(_gameObject1);
+
             base.Dispose();
         }
 
@@ -34,6 +38,9 @@ namespace GFGGame
             _scenePrefab = GFGAsset.Load<GameObject>(ResPathUtil.GetPrefabPath("SceneDressUp"));
             _ui.m_bg.onClick.Add(OnClickBg);
 
+            string resPath = ResPathUtil.GetViewEffectPath("ui_ck", "ui_ck_tz");
+            SceneController.AddObjectToView(null, null, _ui.m_holderEffect, resPath, out _gameObject1, out _wrapper1);
+
         }
 
         protected override void OnShown()
@@ -104,7 +111,7 @@ namespace GFGGame
 
         private void UpdateView(int itemId)
         {
-
+            _ui.m_holderEffect.visible = true;
             int count = 0;
             int totalCount = 1;
             int suitId = 0;

BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes