Ver código fonte

词牌升级升星界面换新ui

huangxiaoyue 1 ano atrás
pai
commit
72cfdefcce
25 arquivos alterados com 169 adições e 29 exclusões
  1. 2 0
      GameClient/Assets/Game/HotUpdate/Data/FightDataManager.cs
  2. 9 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Card/UI_CardUpUI.cs
  3. 77 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ListScoreItem2.cs
  4. 11 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ListScoreItem2.cs.meta
  5. 70 26
      GameClient/Assets/Game/HotUpdate/Views/Card/CardUpView.cs
  6. BIN
      GameClient/Assets/ResIn/UI/Card/Card_atlas0!a.png
  7. BIN
      GameClient/Assets/ResIn/UI/Card/Card_atlas0.png
  8. BIN
      GameClient/Assets/ResIn/UI/Card/Card_atlas0_1!a.png
  9. BIN
      GameClient/Assets/ResIn/UI/Card/Card_atlas0_1.png
  10. BIN
      GameClient/Assets/ResIn/UI/Card/Card_atlas0_2!a.png
  11. BIN
      GameClient/Assets/ResIn/UI/Card/Card_atlas0_2.png
  12. BIN
      GameClient/Assets/ResIn/UI/Card/Card_atlas0_3!a.png
  13. BIN
      GameClient/Assets/ResIn/UI/Card/Card_atlas0_3.png
  14. BIN
      GameClient/Assets/ResIn/UI/Card/Card_fui.bytes
  15. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png
  16. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png
  17. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1!a.png
  18. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1.png
  19. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_2!a.png
  20. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_2.png
  21. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_3!a.png
  22. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_3.png
  23. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_5!a.png
  24. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_5.png
  25. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Data/FightDataManager.cs

@@ -31,6 +31,8 @@ namespace GFGGame
             _fightSpeed = 1;
             _autoPlay = false;
             _storyDialogSpeed = 1;
+            _totalScore = 0;
+            _targetTotalScore = 0;
         }
 
         public int GetScore(FightData roleData)

+ 9 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Card/UI_CardUpUI.cs

@@ -8,11 +8,13 @@ namespace UI.Card
     {
         public GComponent target;
         public Controller m_c1;
-        public GTextField m_txtTitle;
+        public GGraph m_bgTouch;
         public GTextField m_txtLast;
         public GTextField m_txtNow;
         public GList m_listProperty;
         public GList m_listLastProperty;
+        public GList m_listCardProperty;
+        public GList m_listLastCardProperty;
         public const string URL = "ui://7l6lvkayjzrr8p";
         public const string PACKAGE_NAME = "Card";
         public const string RES_NAME = "CardUpUI";
@@ -61,20 +63,24 @@ namespace UI.Card
         private void Init(GComponent comp)
         {
             m_c1 = comp.GetController("c1");
-            m_txtTitle = (GTextField)comp.GetChild("txtTitle");
+            m_bgTouch = (GGraph)comp.GetChild("bgTouch");
             m_txtLast = (GTextField)comp.GetChild("txtLast");
             m_txtNow = (GTextField)comp.GetChild("txtNow");
             m_listProperty = (GList)comp.GetChild("listProperty");
             m_listLastProperty = (GList)comp.GetChild("listLastProperty");
+            m_listCardProperty = (GList)comp.GetChild("listCardProperty");
+            m_listLastCardProperty = (GList)comp.GetChild("listLastCardProperty");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_c1 = null;
-            m_txtTitle = null;
+            m_bgTouch = null;
             m_txtLast = null;
             m_txtNow = null;
             m_listProperty = null;
             m_listLastProperty = null;
+            m_listCardProperty = null;
+            m_listLastCardProperty = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 77 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ListScoreItem2.cs

@@ -0,0 +1,77 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.CommonGame
+{
+    public partial class UI_ListScoreItem2
+    {
+        public GComponent target;
+        public Controller m_ArrowsType;
+        public GTextField m_txtProperty;
+        public GLoader m_loaIcon;
+        public const string URL = "ui://eg2y0ldpt2dztqq";
+        public const string PACKAGE_NAME = "CommonGame";
+        public const string RES_NAME = "ListScoreItem2";
+        private static UI_ListScoreItem2 _proxy;
+
+        public static UI_ListScoreItem2 Create(GObject gObject = null)
+        {
+            var ui = new UI_ListScoreItem2();
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_ListScoreItem2 Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ListScoreItem2();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)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_ArrowsType = comp.GetController("ArrowsType");
+            m_txtProperty = (GTextField)comp.GetChild("txtProperty");
+            m_loaIcon = (GLoader)comp.GetChild("loaIcon");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_ArrowsType = null;
+            m_txtProperty = null;
+            m_loaIcon = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

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

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

+ 70 - 26
GameClient/Assets/Game/HotUpdate/Views/Card/CardUpView.cs

@@ -29,8 +29,6 @@ namespace GFGGame
                 _ui = null;
             }
             base.Dispose();
-
-
         }
 
         protected override void OnInit()
@@ -42,10 +40,18 @@ namespace GFGGame
             this.modal = true;
 
             //MakeFullScreen(_ui);
-
+            _ui.m_bgTouch.onClick.Add(OnBackClick);
             _ui.m_listProperty.itemRenderer = RenderListPropertyItem;
             _ui.m_listLastProperty.itemRenderer = RenderListLastPropertyItem;
+            _ui.m_listCardProperty.itemRenderer = RenderListCardPropertyItem;
+            _ui.m_listLastCardProperty.itemRenderer = RenderListLastCardPropertyItem;
         }
+
+        private void OnBackClick()
+        {
+            this.Hide();
+        }
+
         protected override void OnShown()
         {
             base.OnShown();
@@ -55,8 +61,6 @@ namespace GFGGame
             _curNum = (int)(viewData as object[])[3];
             _cardId = (int)(viewData as object[])[4];
 
-            _ui.m_listProperty.numItems = _scores.Count;
-
             if (_type == "lv")
             {
                 _ui.m_c1.selectedIndex = 0;
@@ -75,6 +79,8 @@ namespace GFGGame
                     _mainScore += cardLvCfg.mainScore;
                     _otherScore += cardLvCfg.otherScore;
                 }
+                _ui.m_listProperty.numItems = _scores.Count;
+                _ui.m_listLastProperty.numItems = _scores.Count;
             }
             else if (_type == "star")
             {
@@ -83,52 +89,90 @@ namespace GFGGame
                 _ui.m_txtNow.text = string.Format("{0}星", _curNum / 5);
                 _cardStarCfg = CardStarCfgArray.Instance.GetCfgBycardIdAndstarLvl(_cardId, _lastNum);
                 _cardLvCfg = null;
+                _ui.m_listCardProperty.numItems = 1;
+                _ui.m_listLastCardProperty.numItems = 1;
             }
             else { 
                 _ui.m_c1.selectedIndex = 2;
                 _cardStarCfg = CardStarCfgArray.Instance.GetCfgBycardIdAndstarLvl(_cardId, _lastNum);
                 _cardLvCfg = null;
+                _ui.m_listCardProperty.numItems = 1;
+                _ui.m_listLastCardProperty.numItems = 1;
             }
-            _ui.m_listLastProperty.numItems = _scores.Count;
             Timers.inst.AddUpdate(CheckGuide);
         }
 
-        private void RenderListLastPropertyItem(int index, GObject obj)
+        private void RenderListLastCardPropertyItem(int index, GObject obj)
         {
-            UI_ListScoreItem listItem = UI_ListScoreItem.Proxy(obj);
+            UI_ListScoreItem2 listItem = UI_ListScoreItem2.Proxy(obj);
             int score = 0;
-            if (_cardStarCfg != null)
+            int typeIndex = 0;
+            listItem.m_ArrowsType.selectedIndex = 2;
+            if (_cardStarCfg.score1 > 0) {
+                typeIndex = 1;
+                score = _scores[typeIndex] - _cardStarCfg.score1;
+            }
+            else if (_cardStarCfg.score2 > 0)
             {
-                if (index == 0)
-                    score = _scores[index + 1] - _cardStarCfg.score1;
-                else if (index == 1)
-                    score = _scores[index + 1] - _cardStarCfg.score2;
-                else if (index == 2)
-                    score = _scores[index + 1] - _cardStarCfg.score3;
-                else if (index == 3)
-                    score = _scores[index + 1] - _cardStarCfg.score4;
+                typeIndex = 2;
+                score = _scores[typeIndex] - _cardStarCfg.score2;
             }
-            else {
-                if ((index + 1) == _itemCfgMainScore)
-                    score = _scores[index + 1] - _mainScore;
-                else
-                    score = _scores[index + 1] - _otherScore;
+            else if (_cardStarCfg.score3 > 0)
+            {
+                typeIndex = 3;
+                score = _scores[typeIndex] - _cardStarCfg.score3;
+            }
+            else if (_cardStarCfg.score4 > 0)
+            {
+                typeIndex = 4;
+                score = _scores[typeIndex] - _cardStarCfg.score4;
             }
             listItem.m_txtProperty.text = score.ToString();
+            listItem.m_loaIcon.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + (typeIndex));
+            UI_ListScoreItem2.ProxyEnd();
+        }
+        
+        private void RenderListLastPropertyItem(int index, GObject obj)
+        {
+            UI_ListScoreItem2 listItem = UI_ListScoreItem2.Proxy(obj);
+            int score = 0;
+            listItem.m_ArrowsType.selectedIndex = 1;
+
+            if ((index + 1) == _itemCfgMainScore)
+                score = _scores[index + 1] - _mainScore;
+            else
+                score = _scores[index + 1] - _otherScore;
+            listItem.m_txtProperty.text = score.ToString();
             listItem.m_loaIcon.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + (index + 1));
-            UI_ListScoreItem.ProxyEnd();
+            UI_ListScoreItem2.ProxyEnd();
         }
 
         private void RenderListPropertyItem(int index, GObject obj)
         {
-            UI_ListScoreItem listItem = UI_ListScoreItem.Proxy(obj);
+            UI_ListScoreItem2 listItem = UI_ListScoreItem2.Proxy(obj);
 
             listItem.m_txtProperty.text = _scores[index + 1].ToString();
             listItem.m_loaIcon.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + (index + 1));
-            UI_ListScoreItem.ProxyEnd();
+            UI_ListScoreItem2.ProxyEnd();
+        }
+
+        private void RenderListCardPropertyItem(int index, GObject obj)
+        {
+            UI_ListScoreItem2 listItem = UI_ListScoreItem2.Proxy(obj);
+            int typeIndex = 0;
+            if (_cardStarCfg.score1 > 0)
+                typeIndex = 1;
+            else if (_cardStarCfg.score2 > 0)
+                typeIndex = 2;
+            else if (_cardStarCfg.score3 > 0)
+                typeIndex = 3;
+            else if (_cardStarCfg.score4 > 0)
+                typeIndex = 4;
+            listItem.m_txtProperty.text = _scores[typeIndex].ToString();
+            listItem.m_loaIcon.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + typeIndex);
+            UI_ListScoreItem2.ProxyEnd();
         }
 
-        
         protected override void OnHide()
         {
             base.OnHide();

BIN
GameClient/Assets/ResIn/UI/Card/Card_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/Card/Card_atlas0.png


BIN
GameClient/Assets/ResIn/UI/Card/Card_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/Card/Card_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/Card/Card_atlas0_2!a.png


BIN
GameClient/Assets/ResIn/UI/Card/Card_atlas0_2.png


BIN
GameClient/Assets/ResIn/UI/Card/Card_atlas0_3!a.png


BIN
GameClient/Assets/ResIn/UI/Card/Card_atlas0_3.png


BIN
GameClient/Assets/ResIn/UI/Card/Card_fui.bytes


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_2!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_2.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_3!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_3.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_5!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_5.png


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