Parcourir la source

抽奖卡池替换资源

zhaoyang il y a 3 ans
Parent
commit
c17fa7b24b

BIN
FGUIProject/assets/LuckyBox/imagesExport/cj_bj_5.jpg


BIN
FGUIProject/assets/LuckyBox/imagesExport/cj_bj_6.jpg


+ 2 - 0
FGUIProject/assets/LuckyBox/package.xml

@@ -51,6 +51,8 @@
     <image id="qr4e27" name="wpzs_anniu_1.png" path="/images/"/>
     <image id="qr4e28" name="wpzs_bji.png" path="/images/"/>
     <image id="qr4e29" name="wpzs_yhd.png" path="/images/"/>
+    <image id="cs8j2a" name="cj_bj_6.jpg" path="/imagesExport/" exported="true" atlas="alone_npot"/>
+    <image id="cs8j2b" name="cj_bj_5.jpg" path="/imagesExport/" exported="true" atlas="alone_npot"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\LuckyBox" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 21 - 7
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -23,7 +23,7 @@ namespace GFGGame
         private GoWrapper _wrapper3;
 
         private bool isActiveBoxOpen = false;
-
+        private int bgIndex = 0;
 
         public override void Dispose()
         {
@@ -81,13 +81,16 @@ namespace GFGGame
             LuckyBoxDataManager.Instance.currentBoxId = boxId;
             Debug.Log("zoya0:" + LuckyBoxDataManager.Instance.currentBoxId);
             isActiveBoxOpen = Array.IndexOf(LuckyBoxDataManager.Instance.luckyBoxIds, LuckyBoxDataManager.BOX_ID_1) >= 0;
+            bgIndex = 0;
 
             int index = Array.IndexOf(LuckyBoxDataManager.Instance.luckyBoxIds, LuckyBoxDataManager.Instance.currentBoxId);
             _ui.m_listBg.numItems = LuckyBoxDataManager.Instance.luckyBoxIds.Length;
             _ui.m_listBg.ScrollToView(index);
             _ui.m_listBg.scrollPane.decelerationRate = 0.8f;
-
-            Timers.inst.Add(1, 0, CheckTime);
+            if (isActiveBoxOpen)
+            {
+                Timers.inst.Add(1, 0, CheckTime);
+            }
 
             _valueBarController.OnShown();
             _valueBarController.Controller(4);
@@ -96,6 +99,7 @@ namespace GFGGame
             // UpdateNormal();
             OnListBgScroll();
             updateBoxEffect();
+            Timers.inst.Add(8, 0, UpdateBg);
         }
 
         private void RenderListBgItem(int index, GObject obj)
@@ -103,15 +107,15 @@ namespace GFGGame
             UI_ComListBgItem item = UI_ComListBgItem.Proxy(obj);
             int id = LuckyBoxDataManager.Instance.luckyBoxIds[index];
             LuckyBoxCfg cfg = LuckyBoxCfgArray.Instance.GetCfg(id);
-            item.m_loaBg.url = string.Format("ui://LuckyBox/{0}", cfg.res);
+            item.m_loaBg.url = string.Format("ui://LuckyBox/{0}", cfg.resArr[0]);
             item.target.data = id;
         }
         private void CheckTime(object param = null)
         {
             if (!isActiveBoxOpen)
             {
-                //活动未开启
-                // LuckyBoxDataManager.Instance.currentBoxId = LuckyBoxDataManager.Instance.luckyBoxIds[0];
+                //活动未开启                           
+                LuckyBoxDataManager.Instance.currentBoxId = LuckyBoxDataManager.Instance.luckyBoxIds[0];
                 Debug.Log("zoya1:" + LuckyBoxDataManager.Instance.currentBoxId);
 
                 Timers.inst.Remove(CheckTime);
@@ -222,7 +226,16 @@ namespace GFGGame
             });
         }
 
-
+        private void UpdateBg(object param)
+        {
+            int index = Array.IndexOf(LuckyBoxDataManager.Instance.luckyBoxIds, LuckyBoxDataManager.Instance.currentBoxId);
+            UI_ComListBgItem item = UI_ComListBgItem.Proxy(_ui.m_listBg.GetChildAt(index));
+            int id = (int)item.target.data;
+            string[] resArr = LuckyBoxCfgArray.Instance.GetCfg(id).resArr;
+            bgIndex++;
+            if (bgIndex == resArr.Length) bgIndex = 0;
+            item.m_loaBg.url = string.Format("ui://LuckyBox/{0}", resArr[bgIndex]);
+        }
         protected override void OnHide()
         {
             base.OnHide();
@@ -231,6 +244,7 @@ namespace GFGGame
             Timers.inst.Remove(CheckTime);
             EventAgent.RemoveEventListener(ConstMessage.ITEM_CHANGED, UpdateNormal);
             EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, UpdateNormal);
+            Timers.inst.Remove(UpdateBg);
         }
 
         private void OnClickBtnBack()

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


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas_cs8j2a.png


+ 96 - 0
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas_cs8j2a.png.meta

@@ -0,0 +1,96 @@
+fileFormatVersion: 2
+guid: 77e208a2800b2ea40997e05b17de8c1f
+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/LuckyBox/LuckyBox_atlas_cs8j2b.png


+ 96 - 0
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas_cs8j2b.png.meta

@@ -0,0 +1,96 @@
+fileFormatVersion: 2
+guid: defa7929d7a47b14bbc4ebc0884409b4
+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/LuckyBox/LuckyBox_fui.bytes