Beispiel #1
0
        //-------------------------------------------------------------------------
        public override void init()
        {
            Debug.Log("ClientLogin.init()");

            Entity et_app = EntityMgr.findFirstEntityByType <EtApp>();

            CoApp = et_app.getComponent <ClientApp <DefApp> >();

            EntityMgr.getDefaultEventPublisher().addHandler(Entity);

            MbMain.Instance.setupMain();
            CoApp.CoDataEye.setupDataEye();

            // 显示登录界面
            UiMgr.Instance.destroyFirstUi <UiLoading>();
            UiLogin ui_login = UiMgr.Instance.createUi <UiLogin>("Login", "Login");

            //string version_info = string.Format("应用版本:{0} 数据版本:{1}", CoApp.BundleVersion, CoApp.DataVersion);
            //mb_login.setVersion(version_info);

            if (PlayerPrefs.HasKey(ClientLogin <DefLogin> .mGuestPlayerKey))
            {
                mGuestPlayerInfo = EbTool.jsonDeserialize <_tGuestPlayerInfo>(PlayerPrefs.GetString(ClientLogin <DefLogin> .mGuestPlayerKey));
            }
        }
Beispiel #2
0
 //-------------------------------------------------------------------------
 void _clearGuest()
 {
     mGuestPlayerInfo = null;
     PlayerPrefs.DeleteKey(mGuestPlayerKey);
 }