Sfoglia il codice sorgente

修改登录后,直接进入游戏场景,跳过大厅UI

大爷 1 anno fa
parent
commit
ab7eee52e1

+ 2 - 0
Unity/Assets/Scripts/Codes/Hotfix/Client/Login/LoginHelper.cs

@@ -62,6 +62,8 @@ namespace ET.Client
                 var ret = (G2C_BindPlayer)await gateSession.Call(new C2G_BindPlayer() { PlayerId = 0 });
 
                 await EventSystem.Instance.PublishAsync(clientScene, new EventType.LoginFinish() { player = ret.Player});
+
+                EnterMapHelper.EnterMapAsync(clientScene, ret.Player, ret.Player.instanceId).Coroutine();
             }
             catch (Exception e)
             {

+ 4 - 8
Unity/Assets/Scripts/Codes/HotfixView/Client/UI/UILobby/LoginFinish_CreateLobbyUI.cs

@@ -5,11 +5,11 @@ using UnityEngine;
 namespace ET.Client
 {
     [Event(SceneType.Client)]
-    public class LoginFinish_CreateLobbyUI : AEvent<EventType.LoginFinish>
+    public class LoginFinish_CreateLobbyUI //: AEvent<EventType.LoginFinish>
     {
-        protected override async ETTask Run(Scene scene, EventType.LoginFinish args)
+       /*protected override async ETTask Run(Scene scene, EventType.LoginFinish args)
         {
-            
+            EnterMapHelper.EnterMapAsync(scene, args.player, args.player.instanceId).Coroutine();
             Log.Debug("enter lobby.");
             var view = await UIHelper.Create("Lobby");
             InitView(scene, args.player, view);
@@ -37,10 +37,6 @@ namespace ET.Client
 
             btn = view.GetChild("Btn_PVE");
             btn.visible = false;
-            /*btn.onClick.Add(() =>
-            {
-                EnterMapHelper.EnterMapAsync(scene, "Map2").Coroutine();
-            });*/
-        }
+        }*/
     }
 }

+ 5 - 2
Unity/Assets/Scripts/Codes/HotfixView/Client/UI/UILogin/LoginFinish_RemoveLoginUI.cs

@@ -8,8 +8,11 @@ namespace ET.Client
     {
         protected override async ETTask Run(Scene scene, EventType.LoginFinish args)
         {
-            await TimerComponent.Instance.WaitAsync(1000);
-            GRoot.inst.RemoveChildAt(0, true);
+            var login = GRoot.inst.GetChild("Login");
+            if(login != null)
+            {
+                GRoot.inst.RemoveChild(login);
+            }
             UIPackage.RemovePackage("Login");
         }
     }

+ 0 - 4
Unity/Assets/Scripts/Codes/Model/Share/Const/ConstValue.cs

@@ -5,10 +5,6 @@
      */
     public static class ConstValue
     {
-        /** 路由http地址 **/
-        public const string RouterHttpHost = "127.0.0.1";
-        /** 路由http端口 **/
-        public const int RouterHttpPort = 30300;
         /** session过期时间 **/
         public const int SessionTimeoutTime = 30 * 1000;
     }

+ 0 - 11
Unity/Assets/Scripts/Codes/Model/Share/Const/Struct.cs.meta

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