public override void Execute(INotification noti) { Debug.Log("LoginCommand->Execute,处理'E_LOGIN'消息"); switch (noti.Name) { case NotiConst.E_LOGIN: LoginProxy proxy = (LoginProxy)Facade.RetrieveProxy(LoginProxy.NAME); UserOV obj = (UserOV)noti.Body; proxy.SendLoginMsg(obj); break; default: break; } }
//请求登录 public void SendLoginMsg(UserOV data) { this.data = data; //与服务器通讯,返回消息处理玩之后,如果需要改变试图则调用下面消息 if (data.Name.Equals("tom") && data.Pwd == 123456) { Debug.Log("LoginProxy->SendLoginMsg,Model请求登录"); UserInfoOV uData = new UserInfoOV("Jack", 20); //Loom.RunAsync(() => //{ // Loom.QueueOnMainThread(() => LoginCallBack(uData), 4); //}); LoginCallBack(uData); } }