zhaoyang 2 rokov pred
rodič
commit
0fa58d9c72

+ 1 - 2
FGUIProject/assets/Store/ChargeUI.xml

@@ -1,9 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920" opaque="false">
   <displayList>
-    <component id="n32_hhx9" name="n32" src="fqor7x" fileName="StoreUI.xml" xy="0,0"/>
     <text id="n31_hhx9" name="n31" xy="230,723" size="619,39" fontSize="28" color="#8c8580" text="游戏中任意付费会按照1人民币*10换算成会员经验"/>
-    <component id="n33_hhx9" name="comVipLv" src="hhx91r" fileName="ComVipLv.xml" xy="62,493"/>
+    <component id="n33_hhx9" name="comVipLv" src="hhx91r" fileName="components/ComVipLv.xml" xy="62,493"/>
     <list id="n10_d4iw" name="list" xy="0,793" size="1080,1033" layout="flow_hz" overflow="hidden" colGap="20" defaultItem="ui://p9mtgheohhx91i" align="center" scrollItemToViewOnClick="false">
       <relation target="" sidePair="bottomext-bottom"/>
       <item/>

+ 3 - 3
FGUIProject/assets/Store/components/ComVipLv.xml

@@ -5,15 +5,15 @@
     <text id="n34_hhx9" name="txtLv" xy="60,65" pivot="0.5,0" size="128,94" group="n38_hhx9" font="ui://p9mtgheohhx91g" fontSize="28" color="#8c8580" text="45"/>
     <text id="n35_hhx9" name="n35" xy="38,114" size="31,39" group="n38_hhx9" fontSize="28" color="#5a3e16" text="lv."/>
     <image id="n36_hhx9" name="n36" src="fqortau" fileName="imagesNew/sc_xian.png" xy="31,152" size="168,4" group="n38_hhx9"/>
-    <text id="n37_hhx9" name="n37" xy="57,154" size="116,39" group="n38_hhx9" fontSize="28" color="#5a3e16" text="累计充值"/>
+    <text id="n37_hhx9" name="n37" xy="57,154" size="116,39" group="n38_hhx9" fontSize="28" color="#5a3e16" text="会员等级"/>
     <group id="n38_hhx9" name="n38" xy="31,65" size="168,128"/>
     <component id="n39_hhx9" name="proExp" src="hhx91p" fileName="components/ProgressBar1.xml" xy="250,139">
       <ProgressBar value="50" max="100"/>
     </component>
     <text id="n40_hhx9" name="n40" xy="265,86" size="100,44" group="n43_hhx9" fontSize="32" color="#8c8580" text="再获得"/>
     <loader id="n41_hhx9" name="loaIcon" xy="365,86" size="45,45" group="n43_hhx9" url="ui://eg2y0ldpkztethq" fill="scale"/>
-    <text id="n42_hhx9" name="txtTips" xy="410,87" size="323,44" group="n43_hhx9" fontSize="32" color="#8c8580" ubb="true" vars="true" text="{exp=0}经验可升级为[color=#5A3E16]{lv=0}[/color]级会员"/>
-    <group id="n43_hhx9" name="n43" xy="265,86" size="468,45" advanced="true" layout="hz" excludeInvisibles="true"/>
+    <text id="n42_hhx9" name="txtTips" xy="410,87" size="323,44" group="n43_hhx9" fontSize="32" color="#8c8580" ubb="true" vars="true" text="{exp=0}积分可升级为[color=#5A3E16]{lv=0}[/color]级会员"/>
+    <group id="n43_hhx9" name="grpTips" xy="265,86" size="468,45" advanced="true" layout="hz" excludeInvisibles="true"/>
     <component id="n44_hhx9" name="btnRule" src="psphtkg" fileName="components/BtnRule.xml" pkg="eg2y0ldp" xy="862,63" size="52,52">
       <Button icon="ui://p9mtgheofqortar"/>
     </component>

+ 15 - 0
GameClient/Assets/Game/HotUpdate/Data/RoleDataManager.cs

@@ -83,7 +83,22 @@ namespace GFGGame
                 return ItemDataManager.GetItemNum(ConstItemID.DIAMOND_RED); //GameGlobal.myNumericComponent.GetAsInt(NumericType.DiamondR);
             }
         }
+        public static int vipLv
+        {
+            get
+            {
+                return GameGlobal.myNumericComponent.GetAsInt(NumericType.VipLevel);
 
+            }
+        }
+        public static int vipExp
+        {
+            get
+            {
+                return GameGlobal.myNumericComponent.GetAsInt(NumericType.VipExp);
+
+            }
+        }
         public static int Liveness
         {
             get

+ 0 - 21
GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs

@@ -5,13 +5,6 @@ using ET;
 
 namespace GFGGame
 {
-    public class RechargeStoreType
-    {
-        public static int RECHARGE = 0;
-        public static int GIFT = 1;
-        public static int EXCHANGE = 2;
-
-    }
     public class LockType
     {
         public static int NONE = 0;
@@ -74,20 +67,6 @@ namespace GFGGame
         }
         /************************************************************************************************************/
 
-        // /// <summary>
-        // /// 
-        // /// </summary>
-        // /// <param name="type">StoreTabCfg:index,ShopCfg:menu1</param>
-        // /// <param name="subType">StoreTabCfg:subTab[1] ,ShopCfg:menu1</param>
-        // /// <returns></returns>
-        // public List<ShopCfg> GetShopCfgs(string functonId, int menu2)
-        // {
-        //     StoreTabCfg tabCfg = StoreTabCfgArray.Instance.GetCfgByfunctionId(functonId);
-        //     List<ShopCfg> clothingShopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(tabCfg.index, menu2);
-        //     return clothingShopCfgs;
-        // }
-
-
         public List<ShopCfg> GetList(int storeId, int typeIndex, int scoreType)
         {
             List<ShopCfg> shopCfgs = null;

+ 14 - 1
GameClient/Assets/Game/HotUpdate/Data/ShopViewManager.cs

@@ -1,7 +1,8 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
 using ET;
+using FairyGUI;
+using UI.Store;
 
 namespace GFGGame
 {
@@ -17,5 +18,17 @@ namespace GFGGame
 
             }, true, false, GameConst.MAX_COUNT_TO_BUY_ITEMS);
         }
+
+        public void UpdateVipProgressCom(GObject obj)
+        {
+            UI_ComVipLv com = UI_ComVipLv.Proxy(obj);
+            com.m_txtLv.text = RoleDataManager.vipLv.ToString();
+            VipCfg vipCfg = VipCfgArray.Instance.GetCfg(RoleDataManager.vipLv);
+            com.m_proExp.target.max = vipCfg.num;
+            com.m_proExp.target.value = RoleDataManager.vipExp;
+
+
+            UI_ComVipLv.ProxyEnd();
+        }
     }
 }

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_ComVipLv.cs

@@ -11,6 +11,7 @@ namespace UI.Store
         public UI_ProgressBar1 m_proExp;
         public GLoader m_loaIcon;
         public GTextField m_txtTips;
+        public GGroup m_grpTips;
         public GButton m_btnRule;
         public const string URL = "ui://p9mtgheohhx91r";
         public const string PACKAGE_NAME = "Store";
@@ -63,6 +64,7 @@ namespace UI.Store
             m_proExp = (UI_ProgressBar1)UI_ProgressBar1.Create(comp.GetChild("proExp"));
             m_loaIcon = (GLoader)comp.GetChild("loaIcon");
             m_txtTips = (GTextField)comp.GetChild("txtTips");
+            m_grpTips = (GGroup)comp.GetChild("grpTips");
             m_btnRule = (GButton)comp.GetChild("btnRule");
         }
         public void Dispose(bool disposeTarget = false)
@@ -72,6 +74,7 @@ namespace UI.Store
             m_proExp = null;
             m_loaIcon = null;
             m_txtTips = null;
+            m_grpTips = null;
             m_btnRule = null;
             if(disposeTarget && target != null)
             {

+ 30 - 16
GameClient/Assets/Game/HotUpdate/Views/RechargeStore/ChargeStoreView.cs

@@ -9,6 +9,7 @@ namespace GFGGame
     public class ChargeStoreView : BaseWindow
     {
         private UI_ChargeUI _ui;
+        private List<ShopCfg> _shopCfgs;
 
         public override void Dispose()
         {
@@ -40,7 +41,8 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
-            _ui.m_list.numItems = RechargeCfgArray.Instance.dataArray.Length;
+            _shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_CHARGE, ConstStoreSubId.STORE_CHARGE);
+            _ui.m_list.numItems = _shopCfgs.Count;
 
         }
 
@@ -55,31 +57,43 @@ namespace GFGGame
 
         private void ListItemRenderer(int index, GObject obj)
         {
-            RechargeCfg itemData = RechargeCfgArray.Instance.dataArray[index];
-            UI_StoreListItem item = UI_StoreListItem.Proxy(obj);
-            item.m_txtExchangeCount.visible = false;
+            ShopCfg itemData = _shopCfgs[index];
+            UI_ListChargeItem item = UI_ListChargeItem.Proxy(obj);
             item.m_btnBuy.m_c1.selectedIndex = 1;
             item.m_btnBuy.m_txtTitle.text = itemData.price.ToString();
             if (item.target.data == null)
             {
-                item.target.onClick.Add(() =>
-                {
-                    if (!AntiAddictionController.CheckAntiAddictionRecharge(itemData.price))
-                    {
-                        RechargeSProxy.ReqRecharge(itemData.id).Coroutine();
-                        LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.SHANG_CHENG, 2);
-                    }
-                });
+                item.target.onClick.Add(OnClickBtnBuy);
+                // item.target.onClick.Add(() =>
+                // {
+                //     if (!AntiAddictionController.CheckAntiAddictionRecharge(itemData.price))
+                //     {
+                //         RechargeSProxy.ReqRecharge(itemData.id).Coroutine();
+                //         LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.SHANG_CHENG, 2);
+                //     }
+                // });
             }
             item.target.data = index;
-            item.m_txtName.text = string.Format("{0}{1}", itemData.itemNum, itemData.name);
-            item.m_txtDesc.text = string.Format("首充赠送+{0}{1}", itemData.itemNum, itemData.name);
+            item.m_txtName.text = string.Format("{0}{1}", itemData.itemNum, itemData.itemName);
+            item.m_txtDesc.text = string.Format("首充赠送+{0}{1}", itemData.itemNum, itemData.itemName);
             bool isDouble = ShopDataManager.Instance.GetRechargeBuyNumById(itemData.id) < itemData.doubleTimes;
             item.m_imgDouble.visible = isDouble;
             item.m_txtDesc.visible = isDouble;
-            item.m_icon.url = "ui://Store/sc_zizhuan_" + itemData.id;
+            item.m_icon.url = "ui://Store/sc_zizhuan_" + (index + 1);
 
-            UI_StoreListItem.ProxyEnd();
+            UI_ListChargeItem.ProxyEnd();
+        }
+
+        private void OnClickBtnBuy(EventContext context)
+        {
+            GObject obj = context.sender as GObject;
+            int index = (int)obj.data;
+            ShopCfg itemData = _shopCfgs[index];
+            if (!AntiAddictionController.CheckAntiAddictionRecharge(itemData.price))
+            {
+                RechargeSProxy.ReqRecharge(itemData.id).Coroutine();
+                LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.SHANG_CHENG, 2);
+            }
         }
     }
 }

+ 1 - 3
GameClient/Assets/Game/HotUpdate/Views/ViewManager.cs

@@ -31,8 +31,6 @@ namespace GFGGame
 
             Font font0 = GFGAsset.Load<Font>(ResPathUtil.GetFontPath("FangZhengHeiTiJianTi-1", "ttf"));
             FontManager.RegisterFont(new DynamicFont("FangZhengHeiTiJianTi-1", font0));
-            UIConfig.defaultFont = "FangZhengHeiTiJianTi-1";
-
             Font font1 = GFGAsset.Load<Font>(ResPathUtil.GetFontPath("FZKTJW--GB1-0", "ttf"));
             FontManager.RegisterFont(new DynamicFont("FZKTJW--GB1-0", font1));
             Font font2 = GFGAsset.Load<Font>(ResPathUtil.GetFontPath("SourceHanSerifCN-Regular-1", "otf"));
@@ -50,7 +48,7 @@ namespace GFGGame
             Font font8 = GFGAsset.Load<Font>(ResPathUtil.GetFontPath("SourceHanSerifCN-SemiBold-7", "otf"));
             FontManager.RegisterFont(new DynamicFont("SourceHanSerifCN-SemiBold-7", font8));
 
-
+            UIConfig.defaultFont = "FZKTJW--GB1-0";
 
             _viewDic = new Dictionary<string, UIView>();
             //��ʼ����ͼ������

BIN
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes


BIN
GameClient/Assets/ResIn/UI/Store/Store_fui.bytes