瀏覽代碼

添加首通奖励标志

zhaoyang 3 年之前
父節點
當前提交
18de2bb8f3

+ 1 - 0
FGUIProject/assets/CommonGame/components/ComItem.xml

@@ -11,5 +11,6 @@
     <image id="n16_j8b3" name="imgGot" src="j48o9b" fileName="components/yx_yilq.png" xy="7,80"/>
     <text id="n17_j48o" name="txtHasCount" xy="96,243" pivot="0.5,0" anchor="true" size="105,36" fontSize="26" color="#a28d77" vars="true" text="已拥有:{count=0}"/>
     <loader id="n18_j48o" name="loaRarity" xy="148,0" size="44,94" url="ui://eg2y0ldpd4iw52" autoSize="true"/>
+    <loader id="n19_tc53" name="loaShouTongReward" xy="16,81" size="160,40" url="ui://eg2y0ldptc539z" autoSize="true"/>
   </displayList>
 </component>

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

@@ -166,6 +166,7 @@
     <image id="tt1q9w" name="xjs_ditu_1.png" path="/images/"/>
     <image id="tt1q9x" name="xjs_ditu_2.png" path="/images/"/>
     <image id="tt1q9y" name="xjs_ditu_3.png" path="/images/"/>
+    <image id="tc539z" name="zx_jqgka_stjl.png" path="/images/"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\CommonGame" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 4 - 3
FGUIProject/assets/Main/StoryLevelInfoUI.xml

@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1160" designImageOffsetX="-750">
-  <controller name="ctrlNeed" pages="0,,1,,2," selected="1"/>
+  <controller name="ctrlNeed" pages="0,,1,,2," selected="0"/>
   <displayList>
-    <image id="n2_vxw5" name="n2" src="j48o94" fileName="images/zx_jq_dituditu.png" xy="0,-153"/>
     <loader id="n44_yoe2" name="btnBg" xy="0,-153" size="1080,1414" url="ui://mfvz4q8kj48o94" autoSize="true"/>
     <component id="n0_vxw5" name="btnStart" src="t8o13i" fileName="componentsLevel/ButtonStart.xml" xy="766,864">
       <Button title="开始旅程"/>
@@ -44,7 +43,9 @@
     <component id="n8_t8o1" name="flower" src="s2cc5k" fileName="components/CompFlower1.xml" xy="697,201">
       <relation target="n7_t8o1" sidePair="left-left,top-top"/>
     </component>
-    <list id="n33_t8o1" name="listBonus" xy="0,592" size="1079,281" layout="row" scroll="horizontal" colGap="58" defaultItem="ui://eg2y0ldpj48o98" align="center" autoClearItems="true">
+    <list id="n33_t8o1" name="listBonus" xy="-33,592" pivot="0.5,0" size="1146,281" scale="0.95,0.95" layout="row" overflow="hidden" scroll="horizontal" colGap="30" defaultItem="ui://eg2y0ldpj48o98" align="center" autoClearItems="true">
+      <item/>
+      <item/>
       <item/>
       <item/>
       <item/>

+ 9 - 9
GameClient/Assets/Game/HotUpdate/Data/Cache/StoryBonusDataCache.cs

@@ -12,17 +12,17 @@ namespace GFGGame
         {
             StoryBonusData bonusData = GetBonusData(levelID);
             List<ItemData> bonusList = new List<ItemData>();
-            if(hasOnce)
+            if (hasOnce)
             {
                 bonusList.AddRange(bonusData.bonusOnce);
             }
-            if(bonusData.bonusBase != null)
+            if (bonusData.bonusBase != null)
             {
                 bonusList.AddRange(bonusData.bonusBase);
             }
-            if(bonusData.bonusRandom != null && bonusData.bonusRandom.Count > 0)
+            if (bonusData.bonusRandom != null && bonusData.bonusRandom.Count > 0)
             {
-                if(doRandom)
+                if (doRandom)
                 {
                     StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelID);
                     StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
@@ -41,27 +41,27 @@ namespace GFGGame
         {
             StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(chapterID);
             int[][] bonus = chapterCfg.bonus1Arr;
-            if(index == 1)
+            if (index == 1)
             {
                 bonus = chapterCfg.bonus2Arr;
             }
-            else if(index == 2)
+            else if (index == 2)
             {
                 bonus = chapterCfg.bonus3Arr;
             }
             return ItemUtil.CreateItemDataList(bonus);
         }
 
-        private static StoryBonusData GetBonusData(string levelID)
+        public static StoryBonusData GetBonusData(string levelID)
         {
             StoryBonusData bonusData = null;
-            if(!_bonusDic.ContainsKey(levelID))
+            if (!_bonusDic.ContainsKey(levelID))
             {
                 bonusData = new StoryBonusData();
                 _bonusDic.Add(levelID, bonusData);
                 StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelID);
                 bonusData.bonusOnce = ItemUtil.CreateItemDataList(levelCfg.bonusOnceArr, true);
-                if(levelCfg.fightID != null && levelCfg.fightID.Length > 0)
+                if (levelCfg.fightID != null && levelCfg.fightID.Length > 0)
                 {
                     StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
                     bonusData.bonusBase = ItemUtil.CreateItemDataList(fightCfg.bonusBaseArr);

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

@@ -13,6 +13,7 @@ namespace UI.CommonGame
         public GImage m_imgGot;
         public GTextField m_txtHasCount;
         public GLoader m_loaRarity;
+        public GLoader m_loaShouTongReward;
         public const string URL = "ui://eg2y0ldpj48o98";
         public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "ComItem";
@@ -66,6 +67,7 @@ namespace UI.CommonGame
             m_imgGot = (GImage)comp.GetChild("imgGot");
             m_txtHasCount = (GTextField)comp.GetChild("txtHasCount");
             m_loaRarity = (GLoader)comp.GetChild("loaRarity");
+            m_loaShouTongReward = (GLoader)comp.GetChild("loaShouTongReward");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -75,6 +77,7 @@ namespace UI.CommonGame
             m_imgGot = null;
             m_txtHasCount = null;
             m_loaRarity = null;
+            m_loaShouTongReward = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 15 - 0
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ItemView.cs

@@ -10,6 +10,7 @@ namespace GFGGame
         private GTextField _txtCount;
         private GTextField _txtHasCount;
         private GImage _imgGot;
+        private GLoader _loaShouTongRewardVisble;
 
         private ItemData _itemData;
 
@@ -22,6 +23,7 @@ namespace GFGGame
             _txtCount = obj.GetChild("txtCount") as GTextField;
             _txtHasCount = obj.GetChild("txtHasCount") as GTextField;
             _imgGot = obj.GetChild("imgGot") as GImage;
+            _loaShouTongRewardVisble = obj.GetChild("loaShouTongReward") as GLoader;
             AddClickListener();
         }
 
@@ -41,6 +43,7 @@ namespace GFGGame
             _loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
             RarityIconController.UpdateRarityIcon(_loaRarity, _itemData.id, false);
             _imgGot.visible = false;
+            _loaShouTongRewardVisble.visible = false;
 
             _txtName.text = itemCfg.name;
             _txtCount.SetVar("count", _itemData.num.ToString()).FlushVars();
@@ -78,5 +81,17 @@ namespace GFGGame
                 _txtHasCount.visible = value;
             }
         }
+
+        public bool LoaShouTongRewardVisble
+        {
+            get
+            {
+                return _loaShouTongRewardVisble.visible;
+            }
+            set
+            {
+                _loaShouTongRewardVisble.visible = value;
+            }
+        }
     }
 }

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryLevelInfoView.cs

@@ -125,6 +125,8 @@ namespace GFGGame
                 item.data = new ItemView(item as GComponent);
             }
             (item.data as ItemView).SetData(itemData);
+            List<ItemData> bonusOnceData = StoryBonusDataCache.GetBonusData(_levelID).bonusOnce;
+            (item.data as ItemView).LoaShouTongRewardVisble = !StoryDataManager.CheckCurrentLevelPass() && index < bonusOnceData.Count;
 
         }
 

二進制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png


二進制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png


二進制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes


二進制
GameClient/Assets/ResIn/UI/Main/Main_atlas_n1knde.png


二進制
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes