zhaoyang 3 жил өмнө
parent
commit
ae64674dd2
31 өөрчлөгдсөн 382 нэмэгдсэн , 11 устгасан
  1. 26 0
      FGUIProject/assets/Loading/LoadingView.xml
  2. 12 0
      FGUIProject/assets/Loading/components/ProgressBar2.xml
  3. BIN
      FGUIProject/assets/Loading/images/11.jpg
  4. BIN
      FGUIProject/assets/Loading/images/33.jpg
  5. BIN
      FGUIProject/assets/Loading/images/dljm_chuan.png
  6. BIN
      FGUIProject/assets/Loading/images/dljm_jdk.png
  7. BIN
      FGUIProject/assets/Loading/images/dljm_jdq_1.png
  8. BIN
      FGUIProject/assets/Loading/images/dljm_jdq_2.png
  9. 14 0
      FGUIProject/assets/Loading/package.xml
  10. 3 1
      GameClient/Assets/Game/HotUpdate/Controller/GameController.cs
  11. 4 3
      GameClient/Assets/Game/HotUpdate/Controller/LoginController.cs
  12. 3 2
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Loading.meta
  13. 86 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Loading/UI_LoadingView.cs
  14. 11 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Loading/UI_LoadingView.cs.meta
  15. 3 2
      GameClient/Assets/Game/HotUpdate/Views/Loading.meta
  16. 102 0
      GameClient/Assets/Game/HotUpdate/Views/Loading/LoadingView.cs
  17. 11 0
      GameClient/Assets/Game/HotUpdate/Views/Loading/LoadingView.cs.meta
  18. BIN
      GameClient/Assets/ResIn/UI/ClothingFoster_atlas0.png
  19. BIN
      GameClient/Assets/ResIn/UI/ClothingFoster_fui.bytes
  20. 8 0
      GameClient/Assets/ResIn/UI/Loading.meta
  21. BIN
      GameClient/Assets/ResIn/UI/Loading/Loading_atlas0.png
  22. 1 1
      GameClient/Assets/ResIn/UI/Loading/Loading_atlas0.png.meta
  23. BIN
      GameClient/Assets/ResIn/UI/Loading/Loading_atlas_hibu0.png
  24. 1 1
      GameClient/Assets/ResIn/UI/Loading/Loading_atlas_hibu0.png.meta
  25. BIN
      GameClient/Assets/ResIn/UI/Loading/Loading_atlas_hibu1.png
  26. 96 0
      GameClient/Assets/ResIn/UI/Loading/Loading_atlas_hibu1.png.meta
  27. BIN
      GameClient/Assets/ResIn/UI/Loading/Loading_fui.bytes
  28. 1 1
      GameClient/Assets/ResIn/UI/Loading/Loading_fui.bytes.meta
  29. BIN
      GameClient/Assets/ResIn/UI/RoleLvUp_fui.bytes
  30. BIN
      GameClient/Assets/ResIn/UI/Studio_atlas0.png
  31. BIN
      GameClient/Assets/ResIn/UI/Studio_fui.bytes

+ 26 - 0
FGUIProject/assets/Loading/LoadingView.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="1080,1920">
+  <displayList>
+    <loader id="n0_hibu" name="loaBg" xy="0,-240" size="1080,2400" url="ui://dw2lsl19hibu1" autoSize="true">
+      <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
+    </loader>
+    <component id="n3_hibu" name="progressBar1" src="hibu3" fileName="components/ProgressBar2.xml" xy="40,1626" size="1000,26">
+      <relation target="" sidePair="center-center,bottom-bottom"/>
+      <ProgressBar max="100"/>
+    </component>
+    <graph id="n4_hibu" name="holder" xy="-108,1621" size="10,10">
+      <relation target="n5_hibu" sidePair="right-right,top-top"/>
+    </graph>
+    <image id="n5_hibu" name="imgAni" src="hibu6" fileName="images/dljm_chuan.png" xy="-88,1596">
+      <relation target="n3_hibu" sidePair="bottom-bottom"/>
+    </image>
+    <image id="n6_hibu" name="n6" src="hibu7" fileName="images/dljm_jdk.png" xy="210,1723" group="n8_hibu"/>
+    <text id="n7_hibu" name="txtDescLeft" xy="90,1722" size="900,44" group="n8_hibu" fontSize="25" color="#d8c584" align="center" autoSize="none" strokeColor="#333333" text="启动中...">
+      <relation target="" sidePair=""/>
+    </text>
+    <group id="n8_hibu" name="n8" xy="90,1722" size="900,44" advanced="true">
+      <relation target="" sidePair="center-center,bottom-bottom"/>
+    </group>
+  </displayList>
+  <transition name="t0" autoPlay="true" autoPlayRepeat="-1"/>
+</component>

+ 12 - 0
FGUIProject/assets/Loading/components/ProgressBar2.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="1000,26" extention="ProgressBar">
+  <displayList>
+    <image id="n0_slyz" name="n0" src="hibu4" fileName="images/dljm_jdq_1.png" xy="0,0" size="1000,26">
+      <relation target="" sidePair="width-width,height-height"/>
+    </image>
+    <image id="n1_slyz" name="bar" src="hibu5" fileName="images/dljm_jdq_2.png" xy="38,7" fillMethod="hz">
+      <relation target="" sidePair="width-width"/>
+    </image>
+  </displayList>
+  <ProgressBar/>
+</component>

BIN
FGUIProject/assets/Loading/images/11.jpg


BIN
FGUIProject/assets/Loading/images/33.jpg


BIN
FGUIProject/assets/Loading/images/dljm_chuan.png


BIN
FGUIProject/assets/Loading/images/dljm_jdk.png


BIN
FGUIProject/assets/Loading/images/dljm_jdq_1.png


BIN
FGUIProject/assets/Loading/images/dljm_jdq_2.png


+ 14 - 0
FGUIProject/assets/Loading/package.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packageDescription id="dw2lsl19">
+  <resources>
+    <image id="hibu0" name="33.jpg" path="/images/" exported="true" atlas="alone_npot"/>
+    <image id="hibu1" name="11.jpg" path="/images/" exported="true" atlas="alone_npot"/>
+    <component id="hibu2" name="LoadingView.xml" path="/" exported="true"/>
+    <component id="hibu3" name="ProgressBar2.xml" path="/components/"/>
+    <image id="hibu4" name="dljm_jdq_1.png" path="/images/"/>
+    <image id="hibu5" name="dljm_jdq_2.png" path="/images/"/>
+    <image id="hibu6" name="dljm_chuan.png" path="/images/"/>
+    <image id="hibu7" name="dljm_jdk.png" path="/images/"/>
+  </resources>
+  <publish name="" path="..\GameClient\Assets\ResIn\UI\Loading" packageCount="2" genCode="true"/>
+</packageDescription>

+ 3 - 1
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -168,7 +168,9 @@ namespace GFGGame
 
         private static void EnterGame()
         {
-            LauncherView.Instance.Close();
+            ViewManager.Hide<LoadingView>();
+            // LoadingView.Instance.Close();
+
             GameGlobal.isEnterGame = true;
             if (MainStoryDataManager.CheckOpenMainUI() || GameGlobal.skipGuide)
             {

+ 4 - 3
GameClient/Assets/Game/HotUpdate/Controller/LoginController.cs

@@ -223,9 +223,10 @@ namespace GFGGame
         public static async ETTask ReqEnterGame()
         {
             ViewManager.Hide<LoginView>();
-            LauncherView.Instance.Open();
-            LauncherView.Instance.SetDesc("进入游戏");
-            LauncherView.Instance.SetProgress(100);
+            ViewManager.Show<LoadingView>();
+            // LoadingView.Instance.Open();
+            LoadingView.Instance.SetProgress(100);
+            // LoadingView.Instance.SetDesc("游戏加载中");
             LogServerHelperHttp.SendNodeLog((int)LogNode.StartEnterGame);
             int errorCode = await LoginHelper.GetRealmKey(GameGlobal.zoneScene);
             if (errorCode != ErrorCode.ERR_Success)

+ 3 - 2
GameClient/Assets/ResIn/UI/Studio_fui.bytes.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Loading.meta

@@ -1,6 +1,7 @@
 fileFormatVersion: 2
-guid: 9aacff8ec55afa3418d7898fc30b83e6
-TextScriptImporter:
+guid: bd6c134d5da559045b9225d006e38e53
+folderAsset: yes
+DefaultImporter:
   externalObjects: {}
   userData: 
   assetBundleName: 

+ 86 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Loading/UI_LoadingView.cs

@@ -0,0 +1,86 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.Loading
+{
+    public partial class UI_LoadingView
+    {
+        public GComponent target;
+        public GLoader m_loaBg;
+        public GProgressBar m_progressBar1;
+        public GGraph m_holder;
+        public GImage m_imgAni;
+        public GTextField m_txtDescLeft;
+        public Transition m_t0;
+        public const string URL = "ui://dw2lsl19hibu2";
+        public const string PACKAGE_NAME = "Loading";
+        public const string RES_NAME = "LoadingView";
+        private static UI_LoadingView _proxy;
+
+        public static UI_LoadingView Create(GObject gObject = null)
+        {
+            var ui = new UI_LoadingView();
+            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_LoadingView Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_LoadingView();
+            }
+            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_progressBar1 = (GProgressBar)comp.GetChild("progressBar1");
+            m_holder = (GGraph)comp.GetChild("holder");
+            m_imgAni = (GImage)comp.GetChild("imgAni");
+            m_txtDescLeft = (GTextField)comp.GetChild("txtDescLeft");
+            m_t0 = comp.GetTransition("t0");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_loaBg = null;
+            m_progressBar1 = null;
+            m_holder = null;
+            m_imgAni = null;
+            m_txtDescLeft = null;
+            m_t0 = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Loading/UI_LoadingView.cs.meta

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

+ 3 - 2
GameClient/Assets/ResIn/UI/ClothingFoster_fui.bytes.meta → GameClient/Assets/Game/HotUpdate/Views/Loading.meta

@@ -1,6 +1,7 @@
 fileFormatVersion: 2
-guid: 1f88ef541cbe5bc40aaef50b14e446b3
-TextScriptImporter:
+guid: 0f46b1009c0a6f1428c31fa88b0f97ee
+folderAsset: yes
+DefaultImporter:
   externalObjects: {}
   userData: 
   assetBundleName: 

+ 102 - 0
GameClient/Assets/Game/HotUpdate/Views/Loading/LoadingView.cs

@@ -0,0 +1,102 @@
+using FairyGUI;
+using UI.Loading;
+using UnityEngine;
+
+namespace GFGGame
+{
+    public class LoadingView : BaseWindow
+    {
+
+        private UI_LoadingView _ui;
+
+        private const float SPEED = 0.01f;
+        private string[] resNames = { "11", "33" };
+
+        private GameObject _effectObj;
+        private GoWrapper _wrapper;
+
+        private static LoadingView m_Instance = null;
+
+        public static LoadingView Instance
+        {
+            get
+            {
+                if (m_Instance == null)
+                {
+                    // m_Instance = new LauncherView();
+                    m_Instance = ViewManager.GetUIView(typeof(LoadingView).Name) as LoadingView;
+                }
+                return m_Instance;
+            }
+        }
+        public override void Dispose()
+        {
+            base.Dispose();
+            SceneController.DestroyObjectFromView(_effectObj);
+
+        }
+
+        protected override void OnInit()
+        {
+            base.OnInit();
+            packageName = UI_LoadingView.PACKAGE_NAME;
+            _ui = UI_LoadingView.Create();
+            this.viewCom = _ui.target;
+            isfullScreen = true;
+            string resPath1 = ResPathUtil.GetViewEffectPath("ui_dljm", "ui_dljm_jdt_tw");
+            SceneController.AddObjectToView(null, null, _ui.m_holder, resPath1, out _effectObj, out _wrapper);
+        }
+
+        protected override void OnShown()
+        {
+            base.OnShown();//1;//
+            int index = Random.Range(0, resNames.Length);
+            _ui.m_loaBg.url = string.Format("ui://Loading/{0}", resNames[index]);
+        }
+
+        protected override void OnHide()
+        {
+            base.OnHide();
+        }
+
+        /// <summary>
+        /// 设置进度0-100
+        /// </summary>
+        /// <param name="progress"></param>
+        /// <param name="callback"></param>
+        public void SetProgress(long progress, GTweenCallback callback = null)
+        {
+            if (!ViewManager.isViewOpen(typeof(LoadingView).Name))
+            {
+                return;
+            }
+            GTweener twener = GTween.GetTween(_ui.m_progressBar1, TweenPropType.Progress);
+            if (twener != null)
+            {
+                twener.Kill(true);
+            }
+            if (progress < _ui.m_progressBar1.value)
+            {
+                _ui.m_progressBar1.value = progress;
+                _ui.m_imgAni.x = _ui.m_progressBar1.width * (progress / 100) - 120;
+                callback?.Invoke();
+            }
+            else
+            {
+                float duration = (float)(progress - _ui.m_progressBar1.value) * SPEED;
+
+                GTweener gtweener = _ui.m_progressBar1.TweenValue(progress, duration).OnUpdate((GTweener t) =>
+                {
+                    _ui.m_imgAni.x = _ui.m_progressBar1.width * (t.value.x / 100) - 120;
+
+                });
+                if (callback != null)
+                {
+                    gtweener.OnComplete(callback);
+                }
+            }
+        }
+
+
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Views/Loading/LoadingView.cs.meta

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

BIN
GameClient/Assets/ResIn/UI/ClothingFoster_atlas0.png


BIN
GameClient/Assets/ResIn/UI/ClothingFoster_fui.bytes


+ 8 - 0
GameClient/Assets/ResIn/UI/Loading.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 6b49ac9879f09e840bf87666c2aab02c
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
GameClient/Assets/ResIn/UI/Loading/Loading_atlas0.png


+ 1 - 1
GameClient/Assets/ResIn/UI/Studio_atlas0.png.meta → GameClient/Assets/ResIn/UI/Loading/Loading_atlas0.png.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 47a1b23906dc5294e9fe3371b964c069
+guid: cc412b96b10cdb0409f55eb15f3b47ec
 TextureImporter:
   internalIDToNameTable: []
   externalObjects: {}

BIN
GameClient/Assets/ResIn/UI/Loading/Loading_atlas_hibu0.png


+ 1 - 1
GameClient/Assets/ResIn/UI/ClothingFoster_atlas0.png.meta → GameClient/Assets/ResIn/UI/Loading/Loading_atlas_hibu0.png.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: b103c368c02974f47ae9eff35d5474d2
+guid: f2496c694d31dc544b61044ec43389d8
 TextureImporter:
   internalIDToNameTable: []
   externalObjects: {}

BIN
GameClient/Assets/ResIn/UI/Loading/Loading_atlas_hibu1.png


+ 96 - 0
GameClient/Assets/ResIn/UI/Loading/Loading_atlas_hibu1.png.meta

@@ -0,0 +1,96 @@
+fileFormatVersion: 2
+guid: 86c9bc4b4a0a4164482742447e7c1017
+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/Loading/Loading_fui.bytes


+ 1 - 1
GameClient/Assets/ResIn/UI/RoleLvUp_fui.bytes.meta → GameClient/Assets/ResIn/UI/Loading/Loading_fui.bytes.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 186d062c421d7e84c99d28ec25615308
+guid: 5fbea9b05221ad5438c4f854c8e90ba3
 TextScriptImporter:
   externalObjects: {}
   userData: 

BIN
GameClient/Assets/ResIn/UI/RoleLvUp_fui.bytes


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


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