using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; public class UserProxy : DataProxy { public UserInfo userInfo = new UserInfo(); public override void OnRegister() { userInfo.userName = "Chiva"; } /// /// 用户登录 /// public StudentLoginResponse UserLogin(string account,string password) { StudentLoginResponse response = GrpcChannelContronller.Instance.client.StudentLogin(new StudentLoginRequest() {PhoneNumber = account,Password = password}); if (response != null && response.Result == true) { userInfo.userName = response.Name; userInfo.phoneNumber = account; } return response; } public override void OnRemove() { } } public class UserInfo { /// /// 用户名 /// public string userName; /// /// 账号 /// public string phoneNumber; }