zhaoyang 3 жил өмнө
parent
commit
d41b5bed16

+ 5 - 0
FGUIProject/assets/DailyTask/components/Button3.xml

@@ -1,10 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="320,100" extention="Button">
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
+  <controller name="c1" pages="0,,1," selected="1"/>
   <displayList>
     <image id="n0_wet2" name="n0" src="wet22f" fileName="images/mrqd_anniu_4.png" xy="-11,-12">
+      <gearDisplay controller="c1" pages="1"/>
       <relation target="" sidePair="width-width,height-height"/>
     </image>
+    <image id="n1_slkg" name="n1" src="slkg2m" fileName="images/mrqd_anniu_5.png" xy="-11,-12">
+      <gearDisplay controller="c1" pages="0"/>
+    </image>
   </displayList>
   <Button/>
 </component>

BIN
FGUIProject/assets/DailyTask/images/mrqd_anniu_5.png


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

@@ -20,6 +20,7 @@
     <component id="wet22j" name="ListTaskRewardItem.xml" path="/components/"/>
     <component id="wet22k" name="Button3.xml" path="/components/"/>
     <image id="wet22l" name="mrqd_xian.png" path="/images/"/>
+    <image id="slkg2m" name="mrqd_anniu_5.png" path="/images/"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\DailyTask" packageCount="2" genCode="true"/>
 </packageDescription>

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Data/InstanceZonesDataManager.cs

@@ -269,19 +269,19 @@ namespace GFGGame
             if (type == ConstInstanceZonesType.Story && subType == ConstInstanceZonesSubType.Normal)
             {
                 times = Math.Min(GameConst.MAX_COUNT_FIGHT_QUICKLY, times);
-                title = string.Format("挑战{0}次", NumberUtil.GetChiniseNumberText(GameConst.MAX_COUNT_FIGHT_QUICKLY));
+                title = string.Format("挑战{0}次", times == 0 ? "一" : NumberUtil.GetChiniseNumberText(GameConst.MAX_COUNT_FIGHT_QUICKLY));
             }
             else if (type == ConstInstanceZonesType.Story && subType == ConstInstanceZonesSubType.Hard)
             {
                 times = Math.Min(GameConst.MAX_COUNT_FIGHT_QUICKLY, times);
-                title = string.Format("挑战{0}次", NumberUtil.GetChiniseNumberText(times));
+                title = string.Format("挑战{0}次", times == 0 ? "一" : NumberUtil.GetChiniseNumberText(times));
 
             }
             else if (type == ConstInstanceZonesType.Studio)
             {
                 StudioData studioData = StudioDataManager.Instance.GetStudioDataById(levelCfg.chapterId);
                 times = Math.Min(Math.Min(GameConst.MAX_COUNT_FIGHT_QUICKLY, times), studioData.TotalPlayTimes - studioData.PlayTimes);
-                title = string.Format("挑战{0}次", NumberUtil.GetChiniseNumberText(times));
+                title = string.Format("挑战{0}次", times == 0 ? "一" : NumberUtil.GetChiniseNumberText(times));
             }
 
         }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/DressUp/DressUpObjDataCache.cs

@@ -110,7 +110,7 @@ namespace GFGGame
                 StorageSProxy.ReqSetClientValue(ConstStorageId.STORAGE_AUTO_PLAY, _autoPlay == true ? 1 : 0).Coroutine();
             }
         }
-        public int maxFightSpeed = 8;
+        public int maxFightSpeed = 2;
         private int _fightSpeed = 1;
         public int fightSpeed
         {

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DailyTask/UI_Button3.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.DailyTask
+{
+    public partial class UI_Button3
+    {
+        public GButton target;
+        public Controller m_c1;
+        public const string URL = "ui://5mpsibzzwet22k";
+        public const string PACKAGE_NAME = "DailyTask";
+        public const string RES_NAME = "Button3";
+        private static UI_Button3 _proxy;
+
+        public static UI_Button3 Create(GObject gObject = null)
+        {
+            var ui = new UI_Button3();
+            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_Button3 Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_Button3();
+            }
+            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_c1 = comp.GetController("c1");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_c1 = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DailyTask/UI_Button3.cs.meta

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

+ 3 - 2
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DailyTask/UI_DailyTaskUI.cs

@@ -13,7 +13,7 @@ namespace UI.DailyTask
         public GTextField m_txtDesc1;
         public GLoader m_loaIcon;
         public GList m_list;
-        public GButton m_btnGetAll;
+        public UI_Button3 m_btnGetAll;
         public GComponent m_comValueBar;
         public GButton m_btnback;
         public const string URL = "ui://5mpsibzzlh8v27";
@@ -69,7 +69,7 @@ namespace UI.DailyTask
             m_txtDesc1 = (GTextField)comp.GetChild("txtDesc1");
             m_loaIcon = (GLoader)comp.GetChild("loaIcon");
             m_list = (GList)comp.GetChild("list");
-            m_btnGetAll = (GButton)comp.GetChild("btnGetAll");
+            m_btnGetAll = (UI_Button3)UI_Button3.Create(comp.GetChild("btnGetAll"));
             m_comValueBar = (GComponent)comp.GetChild("comValueBar");
             m_btnback = (GButton)comp.GetChild("btnback");
         }
@@ -81,6 +81,7 @@ namespace UI.DailyTask
             m_txtDesc1 = null;
             m_loaIcon = null;
             m_list = null;
+            m_btnGetAll.Dispose();
             m_btnGetAll = null;
             m_comValueBar = null;
             m_btnback = null;

+ 5 - 3
GameClient/Assets/Game/HotUpdate/Views/DailyTask/DailyTaskView.cs

@@ -33,7 +33,7 @@ namespace GFGGame
             _valueBarController = new ValueBarController(_ui.m_comValueBar);
 
             _ui.m_btnback.onClick.Add(OnBtnBackClick);
-            _ui.m_btnGetAll.onClick.Add(OnBtnGetAllClick);
+            _ui.m_btnGetAll.target.onClick.Add(OnBtnGetAllClick);
             _ui.m_list.itemRenderer = ListItemRender;
             _ui.m_listReward.itemRenderer = ListBoxRewardItemRender;
             _ui.m_listReward.onClickItem.Add(OnBoxRewardItemClick);
@@ -67,7 +67,9 @@ namespace GFGGame
             _ui.m_txtDesc1.text = string.Format(",满{0}活跃度可领奖", DailyTaskDataManager.Instance.GetShowLivenessBoxNum());
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(ConstItemID.LIVENESS);
             _ui.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(itemCfg.res);
-
+            bool canGet = DailyTaskDataManager.Instance.GetTaskStateById(_cfgs[0].id) == ConstBonusStatus.CAN_GET;
+            _ui.m_btnGetAll.m_c1.selectedIndex = canGet ? 1 : 0;//第一个不可领说明没有可领奖的任务
+            _ui.m_btnGetAll.target.touchable = canGet;
         }
         private void ListItemRender(int index, GObject obj)
         {
@@ -103,7 +105,7 @@ namespace GFGGame
 
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(rewards[index][0]);
             item.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(itemCfg.res);
-            item.m_txtNum.text = rewards[index][1].ToString();
+            item.m_txtNum.text = string.Format("x{0}", rewards[index][1]);
         }
         private async void OnBtnGetClick(EventContext context)
         {

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs

@@ -295,7 +295,10 @@ namespace GFGGame
             double partScore = ScoreSystemData.Instance.GetPartItemScore(partId);
             _ui.m_comMineCircle.m_txtCount.text = ((int)partScore).ToString();
             _score += (partScore + _skillScore);
+            Debug.Log("zoya: " + "partScore:" + partScore + "_skillScore: " + _skillScore + " _score:" + _score);
+            Debug.Log("zoya: " + (int)Math.Round(_score));
             EquipDataCache.cacher.totalScore = (int)Math.Round(_score);
+            Debug.Log("zoya: " + EquipDataCache.cacher.totalScore);
 
 
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(_levelCfg.fightID);

BIN
GameClient/Assets/ResIn/UI/DailyTask/DailyTask_atlas0.png


BIN
GameClient/Assets/ResIn/UI/DailyTask/DailyTask_fui.bytes