public static TrophyParam[] GetRootTropies() { ChallengeCategoryParam[] challengeCategories = MonoSingleton <GameManager> .Instance.MasterParam.ChallengeCategories; List <TrophyParam> trophyParamList = new List <TrophyParam>(); TrophyParam[] tropies = ChallengeMission.GetTropies(); foreach (TrophyParam trophyParam in tropies) { TrophyParam trophy = trophyParam; if (trophy.IsChallengeMissionRoot) { ChallengeCategoryParam challengeCategoryParam = ((IEnumerable <ChallengeCategoryParam>)challengeCategories).FirstOrDefault <ChallengeCategoryParam>((Func <ChallengeCategoryParam, bool>)(cat => cat.iname == trophy.Category)); if (challengeCategoryParam != null) { if (challengeCategoryParam.begin_at == null || challengeCategoryParam.end_at == null) { trophyParamList.Add(trophy); } else { DateTime serverTime = TimeManager.ServerTime; if (serverTime >= challengeCategoryParam.begin_at.DateTimes && serverTime <= challengeCategoryParam.end_at.DateTimes) { trophyParamList.Add(trophy); } } } } } return(trophyParamList.ToArray()); }
private static bool IsCategoryOpening(ChallengeCategoryParam category) { if (category.begin_at == null || category.end_at == null) { return(true); } DateTime serverTime = TimeManager.ServerTime; return(serverTime >= category.begin_at.DateTimes && serverTime <= category.end_at.DateTimes); }
public void SetChallengeCategory(ChallengeCategoryParam category) { if (category.end_at.DateTimes < DateTime.MaxValue) { this.TimerBase.SetActive(true); this.mCategoryParam = category; this.mEndTime = this.mCategoryParam.end_at.DateTimes; this.Refresh(); } else { this.TimerBase.SetActive(false); } }
public static TrophyParam[] GetRootTropies() { ChallengeCategoryParam[] challengeCategories = MonoSingleton <GameManager> .Instance.MasterParam.ChallengeCategories; List <TrophyParam> trophyParamList = new List <TrophyParam>(); TrophyParam[] tropies = ChallengeMission.GetTropies(); // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type ChallengeMission.\u003CGetRootTropies\u003Ec__AnonStorey30E tropiesCAnonStorey30E = new ChallengeMission.\u003CGetRootTropies\u003Ec__AnonStorey30E(); foreach (TrophyParam trophyParam in tropies) { // ISSUE: reference to a compiler-generated field tropiesCAnonStorey30E.trophy = trophyParam; // ISSUE: reference to a compiler-generated field if (tropiesCAnonStorey30E.trophy.IsChallengeMissionRoot) { // ISSUE: reference to a compiler-generated method ChallengeCategoryParam challengeCategoryParam = ((IEnumerable <ChallengeCategoryParam>)challengeCategories).FirstOrDefault <ChallengeCategoryParam>(new Func <ChallengeCategoryParam, bool>(tropiesCAnonStorey30E.\u003C\u003Em__31E)); if (challengeCategoryParam != null) { if (challengeCategoryParam.begin_at == null || challengeCategoryParam.end_at == null) { // ISSUE: reference to a compiler-generated field trophyParamList.Add(tropiesCAnonStorey30E.trophy); } else { DateTime serverTime = TimeManager.ServerTime; if (serverTime >= challengeCategoryParam.begin_at.DateTimes && serverTime <= challengeCategoryParam.end_at.DateTimes) { // ISSUE: reference to a compiler-generated field trophyParamList.Add(tropiesCAnonStorey30E.trophy); } } } } } return(trophyParamList.ToArray()); }
private void Awake() { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.DetailWindow, (UnityEngine.Object)null)) { ((Component)this.DetailWindow).get_gameObject().SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.CharMessageWindow, (UnityEngine.Object)null)) { this.CharMessageWindow.SetActive(false); } this.mCategories = ChallengeMission.GetOpeningCategory(); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.CategoryButtonTemplate, (UnityEngine.Object)null)) { return; } this.CategoryButtonTemplate.SetActive(false); for (int index = 0; index < this.mCategories.Length; ++index) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type ChallengeMission.\u003CAwake\u003Ec__AnonStorey30A awakeCAnonStorey30A = new ChallengeMission.\u003CAwake\u003Ec__AnonStorey30A(); // ISSUE: reference to a compiler-generated field awakeCAnonStorey30A.\u003C\u003Ef__this = this; ChallengeCategoryParam mCategory = this.mCategories[index]; GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.CategoryButtonTemplate); ChallengeMissionCategoryButton component = (ChallengeMissionCategoryButton)gameObject.GetComponent <ChallengeMissionCategoryButton>(); // ISSUE: reference to a compiler-generated field awakeCAnonStorey30A.index = index; // ISSUE: method pointer ((UnityEvent)component.Button.get_onClick()).AddListener(new UnityAction((object)awakeCAnonStorey30A, __methodptr(\u003C\u003Em__2A4))); component.SetChallengeCategory(mCategory); this.mCategoryButtons.Add(component); DataSource.Bind <ChallengeCategoryParam>(((Component)component).get_gameObject(), mCategory); gameObject.get_transform().SetParent(this.CategoryButtonContainer, false); gameObject.SetActive(true); } }
private static bool IsCategoryOpening(ChallengeCategoryParam category) { return(category.IsAvailablePeriod(TimeManager.ServerTime)); }