Browse Source

置灰按钮不展示特效

zhaoyang 3 years ago
parent
commit
fa2a9b3574

+ 1 - 1
FGUIProject/assets/CommonGame/components/Button9.xml

@@ -8,7 +8,7 @@
     <text id="n1_842s" name="title" xy="135,7" pivot="0.5,0" anchor="true" size="148,49" fontSize="36" color="#926651" text="自动选择">
       <relation target="" sidePair="center-center"/>
     </text>
-    <movieclip id="n2_lj7e" name="n2" src="lj7ea8" fileName="effect/MovieClip1.jta" xy="-12,-18" size="294,105" blend="screen">
+    <movieclip id="n2_lj7e" name="ani" src="lj7ea8" fileName="effect/MovieClip1.jta" xy="-12,-18" size="294,105" blend="screen">
       <relation target="" sidePair="width-width,height-height"/>
     </movieclip>
   </displayList>

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Button9.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.CommonGame
+{
+    public partial class UI_Button9
+    {
+        public GButton target;
+        public GMovieClip m_ani;
+        public const string URL = "ui://eg2y0ldp842s6q";
+        public const string PACKAGE_NAME = "CommonGame";
+        public const string RES_NAME = "Button9";
+        private static UI_Button9 _proxy;
+
+        public static UI_Button9 Create(GObject gObject = null)
+        {
+            var ui = new UI_Button9();
+            if(gObject == null)
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GButton)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_Button9 Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_Button9();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GButton)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_ani = (GMovieClip)comp.GetChild("ani");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_ani = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Button9.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5cedce002f5d8484ebefd119f1d735c9
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 4 - 0
GameClient/Assets/Game/HotUpdate/Views/Card/CardFosterView.cs

@@ -143,6 +143,7 @@ namespace GFGGame
             _comFosterBottom.m_txtName.text = _cardData.itemCfg.name;
             _comFosterBottom.m_btnStory.visible = CardDataManager.GetStoryCfgsById(_cardData.id).Count > 0 ? true : false;
             _comFosterBottom.m_btnUpLv.grayed = true;
+            _comFosterBottom.m_btnUpLv.GetChild("ani").asMovieClip.visible = true;
             _comFosterBottom.m_loaRarity.url = ResPathUtil.GetCommonGameResPath("kp_sx_da_" + _cardData.itemCfg.rarity);
             _valueBarController = new ValueBarController(_ui.m_ComFosterTop.m_comValueBar, 5);
             _valueBarController.OnShown();
@@ -229,6 +230,7 @@ namespace GFGGame
             _comFosterBottom.m_txtCurExp.text = _showExp.ToString();
             //    = "0";
             _comFosterBottom.m_btnUpLv.grayed = _comLvConsumeGold.m_txtNeed.text == "0" ? true : false;
+            _comFosterBottom.m_btnUpLv.GetChild("ani").asMovieClip.visible = !_comFosterBottom.m_btnUpLv.grayed;
 
             _comFosterBottom.m_ctrlFullLv.selectedIndex = CardDataManager.isFullLv(_cardData.id, _cardData.lv, false) ? 1 : 0;
 
@@ -497,6 +499,8 @@ namespace GFGGame
 
 
                 _comFosterBottom.m_btnUpStar.grayed = int.Parse(_comFosterBottom.m_btnUpStar.data.ToString()) == 1 ? true : false;
+                _comFosterBottom.m_btnUpStar.GetChild("ani").asMovieClip.visible = !_comFosterBottom.m_btnUpStar.grayed;
+
             }
         }
 

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