Przeglądaj źródła

抽奖界面卡,轮换模型需要慢慢淡出

zhaoyang 2 lat temu
rodzic
commit
af601cb273

+ 9 - 0
FGUIProject/assets/LuckyBox/combox/ComModel.xml

@@ -8,5 +8,14 @@
     <graph id="n39_dhoa" name="holder" xy="540,900" pivot="0.5,0.5" anchor="true" size="10,10">
       <relation target="" sidePair="center-center,middle-middle"/>
     </graph>
+    <loader id="n44_ofwu" name="loaMask" xy="0,-240" size="1080,2400" alpha="0" url="ui://drx9d1usduuftf2" align="center" vAlign="middle" fill="scaleMatchWidth">
+      <relation target="" sidePair="width-width,height-height"/>
+    </loader>
   </displayList>
+  <transition name="t0">
+    <item time="0" type="Alpha" target="n44_ofwu" tween="true" startValue="0" endValue="1" duration="18" ease="Linear"/>
+  </transition>
+  <transition name="t1">
+    <item time="0" type="Alpha" target="n44_ofwu" tween="true" startValue="1" endValue="0" duration="18" ease="Linear"/>
+  </transition>
 </component>

+ 9 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComModel.cs

@@ -10,6 +10,9 @@ namespace UI.LuckyBox
         public GLoader m_loaBg;
         public GLoader m_loaRes;
         public GGraph m_holder;
+        public GLoader m_loaMask;
+        public Transition m_t0;
+        public Transition m_t1;
         public const string URL = "ui://drx9d1usmbf1tah";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "ComModel";
@@ -60,12 +63,18 @@ namespace UI.LuckyBox
             m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_loaRes = (GLoader)comp.GetChild("loaRes");
             m_holder = (GGraph)comp.GetChild("holder");
+            m_loaMask = (GLoader)comp.GetChild("loaMask");
+            m_t0 = comp.GetTransition("t0");
+            m_t1 = comp.GetTransition("t1");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_loaBg = null;
             m_loaRes = null;
             m_holder = null;
+            m_loaMask = null;
+            m_t0 = null;
+            m_t1 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 11 - 3
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/LuckyBoxController.cs

@@ -29,14 +29,18 @@ namespace GFGGame
             // _comModel = UI_ComModel.Proxy(_com);
             _curTime = _turnTime;
             _luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(luckyBoxId);
+            _com.GetChild("loaMask").asLoader.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.bgResArr[_bgIndex]);
             ChangeRes();
             Timers.inst.Remove(UpdateTime);
-            Timers.inst.Add(_turnTime, 0, UpdateTime);
+            if (_luckyBoxCfg.resArr.Length > 1 || _luckyBoxCfg.suitIdArr.Length > 1)
+            {
+                Timers.inst.Add(_turnTime, 0, UpdateTime);
+            }
         }
 
         private void UpdateTime(object param)
         {
-
+            _com.GetChild("loaMask").asLoader.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.bgResArr[_bgIndex]);
             _bgIndex = _bgIndex + 1 == _luckyBoxCfg.bgResArr.Length ? 0 : _bgIndex + 1;
             if (_luckyBoxCfg.resArr.Length > 0)
             {
@@ -46,7 +50,9 @@ namespace GFGGame
             {
                 _modelIndex = _modelIndex + 1 == _luckyBoxCfg.suitIdArr.Length ? 0 : _modelIndex + 1;
             }
-            ChangeRes();
+
+            _com.GetTransition("t0").Play(ChangeRes);
+            // ChangeRes();
         }
 
         private void ChangeRes()
@@ -86,6 +92,8 @@ namespace GFGGame
                     _comModel.m_holder.SetPosition(_luckyBoxCfg.posArr[_modelIndex][0], _luckyBoxCfg.posArr[_modelIndex][1], 1);
                 }
             }
+            _comModel.m_t1.Play();
+            // _com.GetTransition("t1").Play();
             UI_ComModel.ProxyEnd();
         }
         public void OnHide()

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/League/LeagueSkillUpView.cs

@@ -215,7 +215,7 @@ namespace GFGGame
                     wrapper = _wrappers[index];
                 }
                 string resPath = ResPathUtil.GetViewEffectPath("ui_league", "tea_nolearn");
-                SceneController.AddObjectToView(gameObject, wrapper, item.m_holder, resPath, out gameObject, out wrapper);
+                SceneController.AddObjectToView(gameObject, wrapper, item.m_holder, resPath, out gameObject, out wrapper, 80);
 
                 if (_gameObjects.Count <= index)
                 {

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


+ 96 - 0
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas_duuftf2!a.png.meta

@@ -0,0 +1,96 @@
+fileFormatVersion: 2
+guid: ce967f454f2c41345afd56909937744d
+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_duuftf2.png


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

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