Exemple #1
0
    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;
    }
Exemple #2
0
    public void onLoginSuccessfully(IKBEvent eventData)
    {
        //KBS_LoginSuccess data = (KBS_LoginSuccess)eventData;
        info("login is successfully!(登陆成功!)");
        UIStatus = MainUIStatus.SelAvatarUI;

        RefreshAvatarList();
    }
Exemple #3
0
    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;
        }
    }
Exemple #4
0
    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(角色名称为空)!");
        }
    }
Exemple #5
0
    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;
            }
        }
    }
Exemple #6
0
 void QuitAvatarCreateUI()
 {
     UIStatus = MainUIStatus.SelAvatarUI;
 }
Exemple #7
0
 void SwitchToAvatarCreateUI()
 {
     UIStatus = MainUIStatus.CreateAvatarUI;
 }