Browse Source

展示套装进度界面

zhangyuqian 1 year ago
parent
commit
290a72e936
30 changed files with 407 additions and 13 deletions
  1. 0 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_GetSuitItemUI.cs
  2. 95 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_SuitItemUI.cs
  3. 11 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_SuitItemUI.cs.meta
  4. 4 2
      GameClient/Assets/Game/HotUpdate/Views/Common/Controller/GetSuitItemController.cs
  5. 1 8
      GameClient/Assets/Game/HotUpdate/Views/CommonGame/GetSuitItemVIew.cs
  6. 91 0
      GameClient/Assets/Game/HotUpdate/Views/CommonGame/SuitItemView.cs
  7. 11 0
      GameClient/Assets/Game/HotUpdate/Views/CommonGame/SuitItemView.cs.meta
  8. 2 0
      GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusShowView.cs
  9. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png
  10. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png
  11. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1!a.png
  12. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1.png
  13. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_2!a.png
  14. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_2.png
  15. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_3!a.png
  16. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_3.png
  17. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_4!a.png
  18. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_4.png
  19. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_5!a.png
  20. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_5.png
  21. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_6!a.png
  22. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_6.png
  23. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_8!a.png
  24. 96 0
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_8!a.png.meta
  25. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_8.png
  26. 96 0
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_8.png.meta
  27. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes
  28. BIN
      GameClient/Assets/ResIn/UI/Studio/Studio_atlas0!a.png
  29. BIN
      GameClient/Assets/ResIn/UI/Studio/Studio_atlas0.png
  30. BIN
      GameClient/Assets/ResIn/UI/Studio/Studio_fui.bytes

+ 0 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_GetSuitItemUI.cs

@@ -11,7 +11,6 @@ namespace UI.CommonGame
         public GGraph m_holderEffect;
         public GGraph m_holder;
         public GTextField m_txtName;
-        public GProgressBar m_probar;
         public GComponent m_item;
         public const string URL = "ui://eg2y0ldptu965e";
         public const string PACKAGE_NAME = "CommonGame";
@@ -64,7 +63,6 @@ namespace UI.CommonGame
             m_holderEffect = (GGraph)comp.GetChild("holderEffect");
             m_holder = (GGraph)comp.GetChild("holder");
             m_txtName = (GTextField)comp.GetChild("txtName");
-            m_probar = (GProgressBar)comp.GetChild("probar");
             m_item = (GComponent)comp.GetChild("item");
         }
         public void Dispose(bool disposeTarget = false)
@@ -73,7 +71,6 @@ namespace UI.CommonGame
             m_holderEffect = null;
             m_holder = null;
             m_txtName = null;
-            m_probar = null;
             m_item = null;
             if(disposeTarget && target != null)
             {

+ 95 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_SuitItemUI.cs

@@ -0,0 +1,95 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.CommonGame
+{
+    public partial class UI_SuitItemUI
+    {
+        public GComponent target;
+        public GLoader m_loaBg;
+        public GGraph m_iconEffect;
+        public GLoader m_iconBg;
+        public GLoader m_icon;
+        public GLoader m_iconBgDown;
+        public GProgressBar m_probar;
+        public GTextField m_txtName;
+        public Transition m_t_open;
+        public Transition m_t_close;
+        public const string URL = "ui://eg2y0ldpcbywtqq";
+        public const string PACKAGE_NAME = "CommonGame";
+        public const string RES_NAME = "SuitItemUI";
+        private static UI_SuitItemUI _proxy;
+
+        public static UI_SuitItemUI Create(GObject gObject = null)
+        {
+            var ui = new UI_SuitItemUI();
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_SuitItemUI Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_SuitItemUI();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_loaBg = (GLoader)comp.GetChild("loaBg");
+            m_iconEffect = (GGraph)comp.GetChild("iconEffect");
+            m_iconBg = (GLoader)comp.GetChild("iconBg");
+            m_icon = (GLoader)comp.GetChild("icon");
+            m_iconBgDown = (GLoader)comp.GetChild("iconBgDown");
+            m_probar = (GProgressBar)comp.GetChild("probar");
+            m_txtName = (GTextField)comp.GetChild("txtName");
+            m_t_open = comp.GetTransition("t_open");
+            m_t_close = comp.GetTransition("t_close");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_loaBg = null;
+            m_iconEffect = null;
+            m_iconBg = null;
+            m_icon = null;
+            m_iconBgDown = null;
+            m_probar = null;
+            m_txtName = null;
+            m_t_open = null;
+            m_t_close = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_SuitItemUI.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a29488f4e7c0c6c4faec35fcd9af84d6
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 4 - 2
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/GetSuitItemController.cs

@@ -6,6 +6,8 @@ namespace GFGGame
     {
         public static bool enable = true;
         private static List<int> _waitingToShowSuit = new List<int>();
+        //这个变量主要用于抽奖自动打开
+        public static bool isAuto = false;
 
         public static void Clear()
         {
@@ -44,14 +46,14 @@ namespace GFGGame
                 if (index >= 0)
                 {
                     _waitingToShowSuit.RemoveAt(index);
-                    ViewManager.Show<GetSuitItemVIew>(suitId);
+                    ViewManager.Show<SuitItemView>(suitId);
                 }
             }
             else if (_waitingToShowSuit.Count > 0)
             {
                 suitId = _waitingToShowSuit[0];
                 _waitingToShowSuit.RemoveAt(0);
-                ViewManager.Show<GetSuitItemVIew>(suitId);
+                ViewManager.Show<SuitItemView>(suitId);
             }
             return suitId;
         }

+ 1 - 8
GameClient/Assets/Game/HotUpdate/Views/CommonGame/GetSuitItemVIew.cs

@@ -116,21 +116,14 @@ namespace GFGGame
             int count = 0;//套装当前拥有的部件数量
             int totalCount = 1;
             // int suitId = 0;
-            //_ui.m_bg.url = ResPathUtil.GetBgImgPath("bg_zhuxian");
+            _ui.m_bg.url = ResPathUtil.GetBgImgPath("bg_zhuxian");
             DressUpMenuSuitDataManager.GetSuitProgressBySuitId(suitId, out count, out totalCount);
-            // totalCount = SuitCfgManager.Instance.GetTotalCountOfOneSuit(suitId);
             if (suitId > 0)
             {
                 SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(suitId);
                 _ui.m_txtName.text = "套装·" + suitCfg.name;
                 int targetY = (int)(_ui.m_item.y + _ui.m_item.height + 50);
             }
-            _ui.m_probar.max = totalCount;
-            _ui.m_probar.value = count;
-            //_ui.m_probar.visible = false;
-            //AlertUI.Show(string.Format("套装进度:{0}/{1}", count, totalCount))
-            //.SetLeftButton(false)
-            //.SetRightButton(true, "确定");
             // UpdateItem(itemId);
 
             _dressUpObjUI.ResetSceneObj(70, false, true, null,  false);

+ 91 - 0
GameClient/Assets/Game/HotUpdate/Views/CommonGame/SuitItemView.cs

@@ -0,0 +1,91 @@
+using UI.CommonGame;
+using FairyGUI;
+using UnityEngine;
+using UI.LuckyBox;
+
+namespace GFGGame
+{
+    public class SuitItemView : BaseWindow
+    {
+        private UI_SuitItemUI _ui;
+        private EffectUI _effectUI1;
+        private int suitID;
+        private int count = 0;//套装当前拥有的部件数量
+        private int totalCount = 1;
+
+        public override void Dispose()
+        {
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            if (_ui != null)
+            {
+                _ui.Dispose();
+                _ui = null;
+            }
+            base.Dispose();
+        }
+
+        protected override void OnInit()
+        {
+            base.OnInit();
+            packageName = UI_SuitItemUI.PACKAGE_NAME;
+            _ui = UI_SuitItemUI.Create();
+            this.viewCom = _ui.target;
+            isfullScreen = true;
+            _ui.m_loaBg.onTouchBegin.Add(OnClickBg);
+        }
+        protected override void OnShown()
+        {
+            base.OnShown();
+            suitID = (int)this.viewData;
+            UpdateView();
+        }
+        private void UpdateView()
+        {
+            DressUpMenuSuitDataManager.GetSuitProgressBySuitId(suitID, out count, out totalCount);
+            if (suitID > 0)
+            {
+                SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(suitID);
+                _ui.m_txtName.text = "套装·" + suitCfg.name;
+                _ui.m_icon.url = ResPathUtil.GetFieldGuideIconPath(suitCfg.res);
+            }
+            _ui.m_probar.max = totalCount;
+            _ui.m_probar.value = count;
+            _ui.m_t_open.Play();
+            if (GetSuitItemController.isAuto)
+            {
+                Timers.inst.Add(0.7f, 1, WaitAutoEnd);
+            }
+        }
+        private void OnClickBg()
+        {
+            if(!GetSuitItemController.isAuto)
+            {
+                this.Hide();
+                if (count == totalCount)
+                {
+                    ViewManager.Show<GetSuitItemVIew>(suitID);
+                }
+            }
+        }
+
+        protected override void OnHide()
+        {
+            
+        }
+
+        private void WaitAutoEnd(object param = null)
+        {
+            this.Hide();
+            if (count == totalCount)
+            {
+                ViewManager.Show<GetSuitItemVIew>(suitID);
+            }
+            else
+            {
+                EventAgent.DispatchEvent(ConstMessage.LUCKY_BOX_ANIMATION_WAIT);
+            }
+            Timers.inst.Remove(WaitAutoEnd);
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Views/CommonGame/SuitItemView.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c5c280d7be561a741b5c1bce401a379c
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusShowView.cs

@@ -347,6 +347,7 @@ namespace GFGGame
 
         private void ClickPass()
         {
+            GetSuitItemController.isAuto = true;
             _ui.m_touchFlipOpen.touchable = true;
             _ui.m_BtnPass.visible = false;
             for (int i = 0; i < _rewardList.Count; i++)
@@ -373,6 +374,7 @@ namespace GFGGame
                 Timers.inst.Remove(UpDataTime);
                 HideOtherShowWindow();
                 _ui.m_touchFlipOpen.touchable = false;
+                GetSuitItemController.isAuto = false;
             }
         }
 

BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_2!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_2.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_3!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_3.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_4!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_4.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_5!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_5.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_6!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_6.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_8!a.png


+ 96 - 0
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_8!a.png.meta

@@ -0,0 +1,96 @@
+fileFormatVersion: 2
+guid: d8dc8bdaa175e09429492f39d61c1bb4
+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/CommonGame/CommonGame_atlas0_8.png


+ 96 - 0
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_8.png.meta

@@ -0,0 +1,96 @@
+fileFormatVersion: 2
+guid: 6f4941d6967bd79429e641e922edb6bb
+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/CommonGame/CommonGame_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Studio/Studio_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/Studio/Studio_atlas0.png


BIN
GameClient/Assets/ResIn/UI/Studio/Studio_fui.bytes