Пример #1
0
 protected override async void Run(ETModel.Session session, Actor_GamerApplyRoomDismiss message)
 {
     try
     {
         Log.Info($"收到申请解散");
         UI ui = GameUtil.CreateUI(UIType.UIRoomDismiss);
         UIRoomDismissComponent uiRoomDismissComponent = ui.GetComponent <UIRoomDismissComponent>();
     }
     catch (Exception e)
     {
         Log.Error(e);
     }
 }
Пример #2
0
        protected override async void Run(ETModel.Session session, Actor_GamerAgreeRoomDismiss message)
        {
            try
            {
                Log.Info($"收到同意:");
                UI uiRoomDismiss = Game.Scene.GetComponent <UIComponent>().Get(UIType.UIRoomDismiss);
                if (uiRoomDismiss == null)
                {
                    return;
                }
                UIRoomDismissComponent uiRoomDismissComponent = uiRoomDismiss.GetComponent <UIRoomDismissComponent>();

                uiRoomDismissComponent.SetUserAgree(message.UserId);
            }
            catch (Exception e)
            {
                Log.Error(e);
            }
        }