[+] 接入ET8服务端

[+] 接入ET8服务端
This commit is contained in:
ALEXTANG
2023-07-13 12:23:48 +08:00
parent e0be062006
commit 336d4b2eb9
1316 changed files with 130657 additions and 626 deletions

View File

@@ -0,0 +1,37 @@
using System;
namespace ET.Client
{
public static partial class EnterMapHelper
{
public static async ETTask EnterMapAsync(Scene root)
{
try
{
G2C_EnterMap g2CEnterMap = await root.GetComponent<ClientSenderCompnent>().Call(new C2G_EnterMap()) as G2C_EnterMap;
// 等待场景切换完成
await root.GetComponent<ObjectWait>().Wait<Wait_SceneChangeFinish>();
EventSystem.Instance.Publish(root, new EventType.EnterMapFinish());
}
catch (Exception e)
{
Log.Error(e);
}
}
public static async ETTask Match(Fiber fiber)
{
try
{
G2C_Match g2CEnterMap = await fiber.Root.GetComponent<ClientSenderCompnent>().Call(new C2G_Match()) as G2C_Match;
}
catch (Exception e)
{
Log.Error(e);
}
}
}
}