public void Event_reqChangeNameCall(string callStr) { string tips; if (callStr == "success") { tips = "命名成功"; Debug.Log(tips); TipsOperation.ShowTips(tips); MainInfoData.GetInstance().Name = (KBEngineApp.app.player() as Account).Name; MainInfoData.GetInstance().UpdateOnceData(); CreateNameGO.SetActive(false); } else if (callStr == "repetition") { tips = "该名字已拥有, 请重新输入"; TipsOperation.ShowTips(tips); Debug.Log(tips); } else { tips = "未知错误 : " + callStr; TipsOperation.ShowTips(tips); Debug.LogError(tips); } }
//添加好友按钮事件 public void AddFriend(InputField inputField) { string addName = inputField.text; Account account = KBEngineApp.app.player() as Account; if (addName == account.Name) { TipsOperation.ShowTips("输入的是自己的名字, 请重新输入"); return; } foreach (FRIEND_INFO friend_info in account.Friend_list) { if (friend_info.name == addName) { TipsOperation.ShowTips("该好友已拥有, 请重新输入"); return; } } account.baseCall("addFriend", inputField.text); inputField.text = ""; }
public void LookInfo() { TipsOperation.ShowTips("该功能等待实现哦"); LongPressCallBack(gameObject); }
//登录失败回调事件 public void Event_onLoginFailed(UInt16 i, byte[] serverData) { TipsOperation.ShowTips(string.Format("登录失败 : " + KBEngineApp.app.serverErr(i))); }
//注册结果回调事件 public void Event_onCreateAccountResult(UInt16 i, byte[] serverData) { TipsOperation.ShowTips(KBEngineApp.app.serverErr(i)); }
public void Event_reqMessageCall(string tips) { TipsOperation.ShowTips(tips); }