Browse Source

卡牌判空

zhaoyang 2 years ago
parent
commit
2b7eb65861

+ 2 - 2
FGUIProject/assets/ClothingShop/components/CompItemInfo.xml

@@ -8,9 +8,9 @@
   </controller>
   <displayList>
     <image id="n7_hinb" name="n7" src="hinb3" fileName="images/fzd_diban_1.png" xy="0,0"/>
-    <text id="n8_hinb" name="txtName" xy="57,41" size="323,62" font="ui://eg2y0ldpwonotja" fontSize="46" color="#b59158" text="衣服名字·名字"/>
+    <text id="n8_hinb" name="txtName" xy="57,41" size="323,61" font="ui://eg2y0ldpwonotja" fontSize="46" color="#b59158" text="衣服名字·名字"/>
     <text id="n30_hinb" name="txtDesc" xy="64,143" size="336,39" fontSize="28" color="#af9a7d" autoSize="height" autoClearText="true" text="赵钱孙李周吴郑王"/>
-    <loader id="n43_hinb" name="rarity" xy="377,20" size="44,94" visible="false" url="ui://eg2y0ldpd4iw52" autoSize="true"/>
+    <loader id="n43_hinb" name="rarity" xy="379,20" size="44,94" visible="false" url="ui://eg2y0ldpd4iw52" autoSize="true"/>
     <text id="n32_hinb" name="txtOwned" xy="170,610" size="119,36" fontSize="26" color="#c97f7a" align="center" ubb="true" vars="true" text="[color=#B39B75]已拥有:[/color]{v1=0}"/>
     <component id="n20_hinb" name="btnBuy" src="r9ritjq" fileName="components/Button15.xml" pkg="mk0fwx0x" xy="83,652">
       <Button title=" "/>

BIN
FGUIProject/assets/ClothingShop/images/fzd_diban_1.png


+ 3 - 1
GameClient/Assets/Game/HotUpdate/Data/CardDataManager.cs

@@ -25,6 +25,7 @@ namespace GFGGame
         public static void Clear()
         {
             _cardDicByType.Clear();
+            _cardStoryCfgDic.Clear();
         }
 
 
@@ -110,7 +111,8 @@ namespace GFGGame
         /// <returns></returns>
         public static CardData GetCardDataById(int cardId)
         {
-            return _cardDicByType[0].ContainsKey(cardId) ? _cardDicByType[0][cardId] : null;
+            if (!_cardDicByType.ContainsKey(0) || !_cardDicByType[0].ContainsKey(cardId)) return null;
+            return _cardDicByType[0][cardId];
         }
         /// <summary>
         /// 根据男主类型获取卡牌列表

+ 4 - 7
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -433,18 +433,17 @@ namespace GFGGame
             GameObject bg = _sceneObject.transform.Find(bgName).gameObject;
             bg.SetActive(false);
             Color backgroundColor = Camera.main.backgroundColor;
-            Camera.main.backgroundColor = new Color(255, 255, 255, 0);
-            GRoot.inst.visible = false;
+            Camera.main.backgroundColor = new Color(0, 0, 0, 0);
+            // GRoot.inst.visible = false;
             yield return new WaitForEndOfFrame();
 
             Rect rect = new Rect(0, 0, UnityEngine.Screen.width, UnityEngine.Screen.height);
             Texture2D tex = new Texture2D((int)rect.width, (int)rect.height, TextureFormat.ARGB32, false);//新建一个Texture2D对象
             tex.ReadPixels(rect, 0, 0);//读取像素,屏幕左下角为0点
             tex.Apply();//保存像素信息
-            // NTexture _nTexture = new NTexture(tex);
-            // EquipDataCache.cacher.FightRoleRes = tex.EncodeToJPG();
+
             EquipDataCache.cacher.RoleTextuex = tex;
-            GRoot.inst.visible = true;
+            // GRoot.inst.visible = true;
             bg.SetActive(true);
             Camera.main.backgroundColor = backgroundColor;
 
@@ -455,8 +454,6 @@ namespace GFGGame
             }
             else
             {
-                // StartCalculateScore();
-                // OnClickBtnPhotograph();
                 StartCalculateScore();
             }
         }

BIN
GameClient/Assets/ResIn/UI/ClothingShop/ClothingShop_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/ClothingShop/ClothingShop_atlas0.png


BIN
GameClient/Assets/ResIn/UI/ClothingShop/ClothingShop_fui.bytes