Răsfoiți Sursa

抽奖界面打开卡顿

zhaoyang 2 ani în urmă
părinte
comite
e53498eaa1

+ 3 - 3
FGUIProject/assets/LuckyBox/package.xml

@@ -28,12 +28,12 @@
     <component id="qdrt1c" name="Button4.xml" path="/components/"/>
     <image id="qi041j" name="cj_zizi_2.png" path="/images/"/>
     <component id="xg6g1k" name="ComHolder.xml" path="/components/" exported="true"/>
-    <movieclip id="jpnf1x" name="MovieClip1.jta" path="/effect/"/>
-    <movieclip id="jpnf26" name="MovieClip2.jta" path="/effect/"/>
+    <movieclip id="jpnf1x" name="MovieClip1.jta" path="/effect/" atlas="10"/>
+    <movieclip id="jpnf26" name="MovieClip2.jta" path="/effect/" atlas="10"/>
     <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/"/>
-    <movieclip id="hibu2m" name="MovieClip3.jta" path="/effect/" atlas="alone_npot"/>
+    <movieclip id="hibu2m" name="MovieClip3.jta" path="/effect/" atlas="10"/>
     <component id="njmn2n" name="ComBox_2.xml" path="/combox/" exported="true"/>
     <component id="njmn2o" name="ComBox_3.xml" path="/combox/" exported="true"/>
     <component id="njmn2p" name="ComBox.xml" path="/combox/" exported="true"/>

+ 15 - 6
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/LuckyBoxController.cs

@@ -4,6 +4,7 @@ using ET;
 using System.Collections.Generic;
 using System;
 using UnityEngine;
+using System.Collections;
 
 namespace GFGGame
 {
@@ -30,7 +31,7 @@ namespace GFGGame
             _curTime = _turnTime;
             _luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(luckyBoxId);
             _com.GetChild("loaMask").asLoader.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.bgResArr[_bgIndex]);
-            ChangeRes();
+            UpdateRes();
             Timers.inst.Remove(UpdateTime);
             if (_luckyBoxCfg.resArr.Length > 1 || _luckyBoxCfg.suitIdArr.Length > 1)
             {
@@ -51,18 +52,24 @@ namespace GFGGame
                 _modelIndex = _modelIndex + 1 == _luckyBoxCfg.suitIdArr.Length ? 0 : _modelIndex + 1;
             }
 
-            _com.GetTransition("t0").Play(ChangeRes);
+            _com.GetTransition("t0").Play(UpdateRes);
             // ChangeRes();
         }
-
-        private void ChangeRes()
+        private void UpdateRes()
+        {
+            Timers.inst.StartCoroutine(ChangeRes());
+        }
+        private IEnumerator ChangeRes()
         {
             UI_ComModel _comModel = UI_ComModel.Proxy(_com);
             _comModel.m_loaBg.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.bgResArr[_bgIndex]);
             if (_luckyBoxCfg.resArr.Length > 0)
             {
+                int direction = _luckyBoxCfg.scaleArr[_modelIndex] >= 0 ? 1 : -1;
+                float scale = _luckyBoxCfg.scaleArr.Length > 0 ? Math.Abs(_luckyBoxCfg.scaleArr[_modelIndex]) / 10000f : 1;
                 _comModel.m_loaRes.url = string.Format("ui://LuckyBox/{0}", _luckyBoxCfg.resArr[_modelIndex]);
                 _comModel.m_loaRes.SetPosition(_luckyBoxCfg.posArr[_modelIndex][0], _luckyBoxCfg.posArr[_modelIndex][1], 1);
+                _comModel.m_loaRes.SetScale(direction * scale, scale);
             }
             else if (_luckyBoxCfg.suitIdArr.Length > 0)
             {
@@ -83,19 +90,21 @@ namespace GFGGame
                 else
                 {
                     _comModel.m_loaRes.url = "";
-
+                    _comModel.m_loaMask.alpha = 1;
+                    yield return null;
                     int scale = _luckyBoxCfg.scaleArr.Length > 0 ? Math.Abs(_luckyBoxCfg.scaleArr[_modelIndex]) / 10000 : 100;
                     _dressUpObjUI.ResetSceneObj(scale, false, false, null, false);
                     _dressUpObjUI.dressUpObj.PutOnSuitCfg(_luckyBoxCfg.suitIdArr[_modelIndex], true, new int[] { ConstDressUpItemType.BEI_JING }, false, false);
                     _dressUpObjUI.UpdateWrapper(_comModel.m_holder);
                     _dressUpObjUI.sceneObject.transform.localScale = new Vector3(direction * scale, scale, scale);
                     _comModel.m_holder.SetPosition(_luckyBoxCfg.posArr[_modelIndex][0], _luckyBoxCfg.posArr[_modelIndex][1], 1);
+                    yield return null;
                 }
             }
             _comModel.m_t1.Play();
-            // _com.GetTransition("t1").Play();
             UI_ComModel.ProxyEnd();
         }
+
         public void OnHide()
         {
             _bgIndex = 0;

BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0!a.png


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


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_1!a.png


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


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_5!a.png


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


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

@@ -1,96 +0,0 @@
-fileFormatVersion: 2
-guid: 77d877fdac379bb43bc5471c7483d102
-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_atlas10!a.png


+ 1 - 1
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas_hibu2m!a.png.meta → GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas10!a.png.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 72c695b5422c302439c034a86254b0b0
+guid: dad734f917fc2214196656fbcaa96b6c
 TextureImporter:
   internalIDToNameTable: []
   externalObjects: {}

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


+ 1 - 1
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_5!a.png.meta → GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas10.png.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: a3701e1a6a70ff943840c61e82608b26
+guid: 72faf663c4721b54d918d618ba17d091
 TextureImporter:
   internalIDToNameTable: []
   externalObjects: {}

BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas_hibu2m!a.png


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


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

@@ -1,96 +0,0 @@
-fileFormatVersion: 2
-guid: 277d5c434dbc61f44bfc5d42129145ae
-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