guodong 2 anos atrás
pai
commit
0ace7f797a

+ 3 - 4
FGUIProject/assets/BornLimit/FirstChargeBonusUI.xml

@@ -1,18 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1230">
-  <controller name="c1" pages="0,,1,,2," selected="2">
+  <controller name="c1" pages="0,,1,,2," selected="0">
     <remark page="0" value="充值"/>
     <remark page="1" value="领取"/>
     <remark page="2" value="已领取"/>
   </controller>
   <displayList>
-    <image id="n4_sjiz" name="n4" src="sjiz5" fileName="首充.png" xy="0,-263"/>
     <image id="n0_fqor" name="n0" src="sjiz3" fileName="images/sc_db.png" xy="0,-43"/>
     <image id="n8_sjiz" name="n8" src="sjiz4" fileName="images/sc_lihui_lnlx.png" xy="10,29"/>
     <image id="n6_sjiz" name="n6" src="sjiz0" fileName="images/sc_mc_db.png" xy="140,202"/>
     <image id="n9_sjiz" name="n9" src="sjiz2" fileName="images/wz_sc.png" xy="437,139"/>
     <image id="n13_idkd" name="n13" src="idkdtnc" fileName="imagesNew/xsqg_zsx.png" pkg="eg2y0ldp" xy="461,400"/>
-    <text id="n7_sjiz" name="txtName" xy="151,297" size="40,130" font="ui://eg2y0ldpa0cftkz" fontSize="30" color="#fffdfc" leading="-6" autoSize="height" strokeColor="#d88f4e" text="岭南荔夏"/>
+    <text id="n7_sjiz" name="txtName" xy="151,297" size="40,135" font="ui://eg2y0ldpa0cftkz" fontSize="30" color="#fffdfc" leading="-6" autoSize="height" strokeColor="#d88f4e" text="岭南荔夏"/>
     <list id="n1_fqor" name="list" xy="493,414" size="402,476" layout="flow_hz" overflow="scroll" lineGap="14" colGap="14" defaultItem="ui://eg2y0ldp9jv6tls">
       <item/>
       <item/>
@@ -29,7 +28,7 @@
       <gearDisplay controller="c1" pages="0"/>
       <Button title="前往充值" icon="ui://eg2y0ldpqqhzk"/>
     </component>
-    <component id="n3_fqor" name="btnGet" src="idkdtna" fileName="components/BtnStyle004.xml" pkg="eg2y0ldp" xy="560,928" touchable="false" grayed="true">
+    <component id="n3_fqor" name="btnGet" src="idkdtna" fileName="components/BtnStyle004.xml" pkg="eg2y0ldp" xy="560,928">
       <gearDisplay controller="c1" pages="1,2"/>
       <gearLook controller="c1" pages="2" values="1,0,1,0" default="1,0,0,1"/>
       <Button title="领取奖励"/>

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

@@ -7,7 +7,6 @@
     <image id="sjiz2" name="wz_sc.png" path="/images/"/>
     <image id="sjiz3" name="sc_db.png" path="/images/"/>
     <image id="sjiz4" name="sc_lihui_lnlx.png" path="/images/"/>
-    <image id="sjiz5" name="首充.png" path="/"/>
   </resources>
   <publish name="" path="../GameClient/Assets/ResIn/UI/BornLimit" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

BIN
FGUIProject/assets/BornLimit/首充.png


+ 3 - 0
FGUIProject/assets/Main/MainUI.xml

@@ -103,6 +103,9 @@
     <graph id="n71_mzf8" name="n71" xy="0,0" size="1080,1920" alpha="0" touchable="false" type="rect" lineSize="0">
       <relation target="" sidePair="width-width,height-height"/>
     </graph>
+    <component id="n79_g1yr" name="btnFirstRecharge" src="qik1tm1" fileName="components/BtnStyle000.xml" pkg="eg2y0ldp" xy="423,223">
+      <Button title="首充"/>
+    </component>
   </displayList>
   <transition name="t1">
     <item time="0" type="Alpha" target="n71_mzf8" tween="true" startValue="0" endValue="1" duration="10" ease="Linear"/>

+ 14 - 2
GameClient/Assets/Game/HotUpdate/Data/ActivityDataManager.cs

@@ -88,8 +88,20 @@ namespace GFGGame
         /// <value></value>
         public int firstChargeBonusStatus
         {
-            get { return _firstChargeBonusStatus; }
-            set { _firstChargeBonusStatus = value; }
+            get 
+            { 
+                var status = GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.FirstRechargeBonusStatus);
+                if (status == ConstBonusStatus.GOT)
+                {
+                    return ConstBonusStatus.GOT;
+                }
+
+                if (GameGlobal.myNumericComponent.GetAsLong(ET.NumericType.RechargeTotal) > 0)
+                {
+                    return ConstBonusStatus.CAN_GET;
+                }
+                return ConstBonusStatus.CAN_NOT_GET;
+            }
         }
     }
 }

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_MainUI.cs

@@ -33,6 +33,7 @@ namespace UI.Main
         public GGroup m_grpRight;
         public GGroup m_grpMove;
         public GLoader m_loaGuidestudio;
+        public GButton m_btnFirstRecharge;
         public Transition m_t1;
         public Transition m_t2;
         public Transition m_t3;
@@ -110,6 +111,7 @@ namespace UI.Main
             m_grpRight = (GGroup)comp.GetChild("grpRight");
             m_grpMove = (GGroup)comp.GetChild("grpMove");
             m_loaGuidestudio = (GLoader)comp.GetChild("loaGuidestudio");
+            m_btnFirstRecharge = (GButton)comp.GetChild("btnFirstRecharge");
             m_t1 = comp.GetTransition("t1");
             m_t2 = comp.GetTransition("t2");
             m_t3 = comp.GetTransition("t3");
@@ -161,6 +163,7 @@ namespace UI.Main
             m_grpRight = null;
             m_grpMove = null;
             m_loaGuidestudio = null;
+            m_btnFirstRecharge = null;
             m_t1 = null;
             m_t2 = null;
             m_t3 = null;

+ 2 - 3
GameClient/Assets/Game/HotUpdate/ServerProxy/ActivitySProxy.cs

@@ -58,13 +58,12 @@ namespace GFGGame
         //领取首冲奖励
         public static async ETTask<bool> ReqFirstChargeBonusRewards()
         {
-            M2C_GetDailySinInBonus response = null;
-            response = (M2C_GetDailySinInBonus)await MessageHelper.SendToServer(new C2M_GetDailySinInBonus() { });
+            S2C_GetFirstRechargeBonus response = null;
+            response = (S2C_GetFirstRechargeBonus)await MessageHelper.SendToServer(new C2S_GetFirstRechargeBonus() { });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    ActivityDataManager.Instance.firstChargeBonusStatus = response.BonusStatus;
                     BonusController.TryShowBonusList(GlobalCfgArray.globalCfg.firstChargeBonusArr);
                     return true;
                 }

+ 35 - 3
GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/FirstChargeBonusView.cs

@@ -35,13 +35,34 @@ namespace GFGGame
 
             _ui.m_btnCharge.onClick.Add(OnBtnChargeClick);
             _ui.m_btnGet.onClick.Add(OnBtnGetClick);
+            _ui.m_btnClose.onClick.Add(closeEventHandler);
+        }
 
+        protected override void AddEventListener()
+        {
+            base.AddEventListener();
+            EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, OnNumericChange);
+        }
+
+        protected override void RemoveEventListener()
+        {
+            base.RemoveEventListener();
+            EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, OnNumericChange);
         }
 
         protected override void OnShown()
         {
             base.OnShown();
-
+            _ui.m_list.numItems = GlobalCfgArray.globalCfg.firstChargeBonusArr.Length;
+            var itemInfo = GlobalCfgArray.globalCfg.firstChargeBonusArr[0];
+            var itemId = itemInfo[0];
+            var itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
+            if(itemCfg.suitId > 0)
+            {
+                var suitCfg = SuitCfgArray.Instance.GetCfg(itemCfg.suitId);
+                _ui.m_txtName.text = suitCfg.name;
+            }
+            UpdateView();
         }
         protected override void OnHide()
         {
@@ -50,7 +71,7 @@ namespace GFGGame
         }
         private void OnBtnChargeClick()
         {
-
+            ViewManager.Show<StoreView>(new object[] { ConstStoreTabId.STORE_CHARGE, ConstStoreSubId.STORE_CHARGE });
         }
         private async void OnBtnGetClick()
         {
@@ -59,12 +80,23 @@ namespace GFGGame
             {
                 UpdateView();
             }
+        
         }
+
+        private void OnNumericChange(EventContext context)
+        {
+            var status = (int)context.data;
+            if (status == NumericType.FirstRechargeBonusStatus || status == NumericType.RechargeTotal)
+            {
+                UpdateView();
+            }
+        }
+
         private void UpdateView()
         {
-            _ui.m_list.numItems = GlobalCfgArray.globalCfg.firstChargeBonusArr.Length;
             _ui.m_c1.selectedIndex = ActivityDataManager.Instance.firstChargeBonusStatus;
         }
+
         private void ListItemRender(int index, GObject obj)
         {
             UI_ComItem item = UI_ComItem.Proxy(obj);

+ 16 - 1
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -149,6 +149,7 @@ namespace GFGGame
             _btnGongGao.onClick.Add(OnClickBtnGongGao);
             _btnRenWu.onClick.Add(OnClickBtnRenWu);
             _btnActivityDay7.onClick.Add(OnClickBtnDay7);
+            _ui.m_btnFirstRecharge.onClick.Add(OnClickBtnFirstRecharge);
             // _btnStudio.onClick.Add(OnClickBtnStudio);
             // _btnField.onClick.Add(OnClickBtnField);
             _btnBag.onClick.Add(OnClickBtnBag);
@@ -197,7 +198,7 @@ namespace GFGGame
             SceneController.UpdateMainScene(_sceneObject);
             UpdateRoleLvl();
             UpdateHead();
-
+            UpdateBtnFirstRecharge();
             _valueBarController.OnShown();
 
 
@@ -620,6 +621,11 @@ namespace GFGGame
             ViewManager.Show<ActivityDay7View>(null, new[] { ViewName.MAINUI_VIEW, this.viewData });
         }
         
+        private void OnClickBtnFirstRecharge()
+        {
+            ViewManager.Show<FirstChargeBonusView>();
+        }
+
         private void OnClickHeadBar()
         {
             ViewManager.Show(ViewName.ROLE_INFO_VIEW);
@@ -676,6 +682,15 @@ namespace GFGGame
                 UpdateRoleLvl();
                 CheckFunOpen();
             }
+            if((int)context.data == NumericType.FirstRechargeBonusStatus)
+            {
+                UpdateBtnFirstRecharge();
+            }
+        }
+
+        private void UpdateBtnFirstRecharge()
+        {
+            _ui.m_btnFirstRecharge.visible = ActivityDataManager.Instance.firstChargeBonusStatus != ConstBonusStatus.GOT;
         }
 
         private void UpdateRoleLvl()

BIN
GameClient/Assets/ResIn/UI/BornLimit/BornLimit_atlas0_1!a.png


+ 0 - 96
GameClient/Assets/ResIn/UI/BornLimit/BornLimit_atlas0_1!a.png.meta

@@ -1,96 +0,0 @@
-fileFormatVersion: 2
-guid: 5d779e1d081d5f74ba925191b6b20ecc
-TextureImporter:
-  internalIDToNameTable: []
-  externalObjects: {}
-  serializedVersion: 11
-  mipmaps:
-    mipMapMode: 0
-    enableMipMap: 0
-    sRGBTexture: 1
-    linearTexture: 0
-    fadeOut: 0
-    borderMipMap: 0
-    mipMapsPreserveCoverage: 0
-    alphaTestReferenceValue: 0.5
-    mipMapFadeDistanceStart: 1
-    mipMapFadeDistanceEnd: 3
-  bumpmap:
-    convertToNormalMap: 0
-    externalNormalMap: 0
-    heightScale: 0.25
-    normalMapFilter: 0
-  isReadable: 0
-  streamingMipmaps: 0
-  streamingMipmapsPriority: 0
-  vTOnly: 0
-  grayScaleToAlpha: 0
-  generateCubemap: 6
-  cubemapConvolution: 0
-  seamlessCubemap: 0
-  textureFormat: 1
-  maxTextureSize: 2048
-  textureSettings:
-    serializedVersion: 2
-    filterMode: 1
-    aniso: 1
-    mipBias: 0
-    wrapU: 1
-    wrapV: 1
-    wrapW: 1
-  nPOTScale: 0
-  lightmap: 0
-  compressionQuality: 50
-  spriteMode: 1
-  spriteExtrude: 1
-  spriteMeshType: 1
-  alignment: 0
-  spritePivot: {x: 0.5, y: 0.5}
-  spritePixelsToUnits: 100
-  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
-  spriteGenerateFallbackPhysicsShape: 1
-  alphaUsage: 1
-  alphaIsTransparency: 1
-  spriteTessellationDetail: -1
-  textureType: 8
-  textureShape: 1
-  singleChannelComponent: 0
-  flipbookRows: 1
-  flipbookColumns: 1
-  maxTextureSizeSet: 0
-  compressionQualitySet: 0
-  textureFormatSet: 0
-  ignorePngGamma: 0
-  applyGammaDecoding: 0
-  platformSettings:
-  - serializedVersion: 3
-    buildTarget: DefaultTexturePlatform
-    maxTextureSize: 2048
-    resizeAlgorithm: 0
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-    androidETC2FallbackOverride: 0
-    forceMaximumCompressionQuality_BC6H_BC7: 0
-  spriteSheet:
-    serializedVersion: 2
-    sprites: []
-    outline: []
-    physicsShape: []
-    bones: []
-    spriteID: 5e97eb03825dee720800000000000000
-    internalID: 0
-    vertices: []
-    indices: 
-    edges: []
-    weights: []
-    secondaryTextures: []
-  spritePackingTag: 
-  pSDRemoveMatte: 0
-  pSDShowRemoveMatteOption: 0
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
GameClient/Assets/ResIn/UI/BornLimit/BornLimit_atlas0_1.png


+ 0 - 96
GameClient/Assets/ResIn/UI/BornLimit/BornLimit_atlas0_1.png.meta

@@ -1,96 +0,0 @@
-fileFormatVersion: 2
-guid: 44942299b13bee647bcada729f7fe274
-TextureImporter:
-  internalIDToNameTable: []
-  externalObjects: {}
-  serializedVersion: 11
-  mipmaps:
-    mipMapMode: 0
-    enableMipMap: 0
-    sRGBTexture: 1
-    linearTexture: 0
-    fadeOut: 0
-    borderMipMap: 0
-    mipMapsPreserveCoverage: 0
-    alphaTestReferenceValue: 0.5
-    mipMapFadeDistanceStart: 1
-    mipMapFadeDistanceEnd: 3
-  bumpmap:
-    convertToNormalMap: 0
-    externalNormalMap: 0
-    heightScale: 0.25
-    normalMapFilter: 0
-  isReadable: 0
-  streamingMipmaps: 0
-  streamingMipmapsPriority: 0
-  vTOnly: 0
-  grayScaleToAlpha: 0
-  generateCubemap: 6
-  cubemapConvolution: 0
-  seamlessCubemap: 0
-  textureFormat: 1
-  maxTextureSize: 2048
-  textureSettings:
-    serializedVersion: 2
-    filterMode: 1
-    aniso: 1
-    mipBias: 0
-    wrapU: 1
-    wrapV: 1
-    wrapW: 1
-  nPOTScale: 0
-  lightmap: 0
-  compressionQuality: 50
-  spriteMode: 1
-  spriteExtrude: 1
-  spriteMeshType: 1
-  alignment: 0
-  spritePivot: {x: 0.5, y: 0.5}
-  spritePixelsToUnits: 100
-  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
-  spriteGenerateFallbackPhysicsShape: 1
-  alphaUsage: 1
-  alphaIsTransparency: 1
-  spriteTessellationDetail: -1
-  textureType: 8
-  textureShape: 1
-  singleChannelComponent: 0
-  flipbookRows: 1
-  flipbookColumns: 1
-  maxTextureSizeSet: 0
-  compressionQualitySet: 0
-  textureFormatSet: 0
-  ignorePngGamma: 0
-  applyGammaDecoding: 0
-  platformSettings:
-  - serializedVersion: 3
-    buildTarget: DefaultTexturePlatform
-    maxTextureSize: 2048
-    resizeAlgorithm: 0
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-    androidETC2FallbackOverride: 0
-    forceMaximumCompressionQuality_BC6H_BC7: 0
-  spriteSheet:
-    serializedVersion: 2
-    sprites: []
-    outline: []
-    physicsShape: []
-    bones: []
-    spriteID: 5e97eb03825dee720800000000000000
-    internalID: 0
-    vertices: []
-    indices: 
-    edges: []
-    weights: []
-    secondaryTextures: []
-  spritePackingTag: 
-  pSDRemoveMatte: 0
-  pSDShowRemoveMatteOption: 0
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
GameClient/Assets/ResIn/UI/BornLimit/BornLimit_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes