public void onKicked(IKBEvent eventData) { KES_Kicked data = (KES_Kicked)eventData; err("kick, disconnect!, reason=" + KBEngineApp.app.serverErr(data.failedcode)); //SceneManager.LoadScene("login"); UIStatus = MainUIStatus.Login; }
public void onLoginSuccessfully(IKBEvent eventData) { //KBS_LoginSuccess data = (KBS_LoginSuccess)eventData; info("login is successfully!(登陆成功!)"); UIStatus = MainUIStatus.SelAvatarUI; RefreshAvatarList(); }
public void EnterGame() { if (selAvatarDBID == 0) { err("Please select a Avatar!(请选择角色!)"); } else { info("Please wait...(请稍后...)"); KBS_EnterGame e = new KBS_EnterGame(); e.dbid = selAvatarDBID; KBEvent.fireIn(KET.selectAvatarGame, e); SceneManager.LoadScene("world"); UIStatus = MainUIStatus.WorldUI; } }
public void CreateAvatar() { string sAvatarName = mAvatarNameText.text; if (sAvatarName.Length > 1) { KBS_CreateAvatar e = new KBS_CreateAvatar(); e.roleType = (Byte)1; e.name = sAvatarName; KBEvent.fireIn(KET.reqCreateAvatar, e); UIStatus = MainUIStatus.SelAvatarUI; } else { err("avatar name is null(角色名称为空)!"); } }
public void RemoveAvatar() { if (selAvatarDBID == 0) { err("Please select a Avatar!(请选择角色!)"); } else { info("Please wait...(请稍后...)"); if (ui_avatarList != null && ui_avatarList.Count > 0) { Dictionary <string, object> avatarinfo = ui_avatarList[selAvatarDBID]; KBS_RemoveAvatar e = new KBS_RemoveAvatar(); e.name = (string)avatarinfo["name"]; KBEvent.fireIn(KET.reqRemoveAvatar, e); UIStatus = MainUIStatus.SelAvatarUI; } } }
void QuitAvatarCreateUI() { UIStatus = MainUIStatus.SelAvatarUI; }
void SwitchToAvatarCreateUI() { UIStatus = MainUIStatus.CreateAvatarUI; }