Exemplo n.º 1
0
    static int GetAnnounceVersion(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 0);
        float o = LoginIDManager.GetAnnounceVersion();

        LuaScriptMgr.Push(L, o);
        return(1);
    }
Exemplo n.º 2
0
    /// <summary>
    /// 每帧更新
    /// </summary>
    public void Update()
    {
        if (GameSystem.Instance.canLoadConfig)
        {
            GameSystem.Instance.canLoadConfig = false;

            GameSystem.Instance.LoadConfig();

            GameSystem.Instance.mClient.mUIManager.LoginCtrl.thread1.Start();
            GameSystem.Instance.mClient.mUIManager.LoginCtrl.thread2.Start();
        }

        _time -= Time.deltaTime;
        if (_time < 0)
        {
            Scheduler.Instance.RemoveUpdator(Update);
#if IOS_SDK || ANDROID_SDK
            LoginNetwork.Instance.DoConnectToLS();
#endif

            //_ui.ButtonOK.GetComponent<UIButton>().enabled = true;
            //NGUITools.SetActive(_ui.ButtonOK.gameObject, true);
        }
        if (oncelogined == 1 &&
            GameSystem.Instance.AnnouncementConfigData != null &&
            GameSystem.Instance.AnnouncementConfigData.GetOpenItem() != null &&
            !string.IsNullOrEmpty(DynamicStringManager.Instance.NoticePopupString)
            )
        {
            //如果本地version和公告version不一致,弹出公告界面
            AnnouncementItem anc = GameSystem.Instance.AnnouncementConfigData.GetOpenItem();

            if (anc != null && LoginIDManager.GetAnnounceVersion() != anc.version)
            {
                showAnnounce();
                LoginIDManager.SetAnnouceVersion(anc.version);
            }
            oncelogined = 2;
        }
    }