| 1234567891011121314151617181920212223 |
- using System;
- namespace ET.Client
- {
- public static partial class EnterMapHelper
- {
- public static async ETTask EnterMapAsync(Scene root)
- {
- try
- {
- G2C_EnterMap g2CEnterMap = await root.GetComponent<ClientSenderComponent>().Call(C2G_EnterMap.Create()) as G2C_EnterMap;
- // 等待场景切换完成
- await root.GetComponent<ObjectWait>().Wait<Wait_SceneChangeFinish>();
- EventSystem.Instance.Publish(root, new EnterMapFinish());
- }
- catch (Exception e)
- {
- Log.Error(e);
- }
- }
- }
- }
|