public static void SetPubInfo(LoginNewsInfo.JSON_PubInfo pubinfo) { if (pubinfo == null) { return; } if (LoginNewsInfo.mPubinfo != null) { PlayerPrefsUtility.SetString(GameUtility.BEFORE_LOGIN_NEWS_INFO_TOKEN, LoginNewsInfo.mPubinfo.token, false); } LoginNewsInfo.mPubinfo = pubinfo; }
protected override void Awake() { LoginInfoParam[] activeLoginInfos = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetActiveLoginInfos(); if (activeLoginInfos == null || activeLoginInfos.Length <= 0) { this.mRootNewsInfoObj.SetActive(false); } else if (LoginNewsInfo.mPubinfo == null) { this.mRootNewsInfoObj.SetActive(false); } else { this.mCurrentPubInfo = LoginNewsInfo.mPubinfo; LoginNewsInfo.isShowNews = true; this.mRootNewsInfoObj.SetActive(true); this.Refresh(); } }
protected override void OnDestroy() { LoginNewsInfo.isShowNews = false; LoginNewsInfo.mPubinfo = (LoginNewsInfo.JSON_PubInfo)null; }