public override void OnActivate(int pinID) { switch (pinID) { case 0: HomeWindow.SetRestorePoint(this.RestorePoint); this.ActivateOutputLinks(10); break; case 1: if (HomeWindow.GetRestorePoint() == this.RestorePoint) { this.ActivateOutputLinks(11); } else { this.ActivateOutputLinks(12); } if (!this.AutoReset) { break; } HomeWindow.SetRestorePoint(this.ResetRestorePoint); break; } }
private void OnDestroy() { if (!Object.op_Equality((Object)HomeWindow.mInstance, (Object)this)) { return; } HomeWindow.mInstance = (HomeWindow)null; }
private void Start() { if (Object.op_Equality((Object)HomeWindow.mInstance, (Object)null)) { HomeWindow.mInstance = this; } this.mStateMachine = new StateMachine <HomeWindow>(this); this.mStateMachine.GotoState <HomeWindow.State_Default>(); }
private void OnDestroy() { if (UnityEngine.Object.op_Equality((UnityEngine.Object)HomeWindow.mInstance, (UnityEngine.Object) this)) { HomeWindow.mInstance = (HomeWindow)null; } Debug.Log((object)"We are destroying our flow handler"); AnalyticsManager.PlacementWantedFlowChangeHandler -= new Action <string>(this.SetGlobalEventToBeRunCallback); }
private void Start() { if (UnityEngine.Object.op_Equality((UnityEngine.Object)HomeWindow.mInstance, (UnityEngine.Object)null)) { HomeWindow.mInstance = this; } Debug.Log((object)"We are setting our flow handler"); AnalyticsManager.PlacementWantedFlowChangeHandler += new Action <string>(this.SetGlobalEventToBeRunCallback); this.mStateMachine = new StateMachine <HomeWindow>(this); this.mStateMachine.GotoState <HomeWindow.State_Default>(); }
public void Refresh(QuestDifficulties difficulty) { this.RefreshQuests(); if (difficulty == QuestDifficulties.Elite && this.CountQuests(QuestDifficulties.Elite) <= 0) { difficulty = QuestDifficulties.Normal; } this.mDifficultyFilter = difficulty; GlobalVars.QuestDifficulty = difficulty; this.isTriggeredRefresh = true; this.RefreshItems(); if (Object.op_Inequality((Object)this.ScrollRect, (Object)null)) { this.ScrollRect.set_normalizedPosition(Vector2.get_one()); if (HomeWindow.GetRestorePoint() == RestorePoints.QuestList && !string.IsNullOrEmpty(GlobalVars.LastPlayedQuest.Get()) && ((QuestStates)GlobalVars.LastQuestState == QuestStates.Cleared && QuestListV2.mScrollPosCache.ContainsKey(this.ListID))) { this.mSetScrollPos = 2; this.mNewScrollPos = QuestListV2.mScrollPosCache[this.ListID]; QuestListV2.mScrollPosCache.Remove(this.ListID); HomeWindow.SetRestorePoint(RestorePoints.Home); } } this.RefreshButtons(difficulty); if (Object.op_Inequality((Object)this.BtnElite, (Object)null)) { this.BtnElite.SetActive(true); } if (!Object.op_Inequality((Object)this.BtnNormal, (Object)null)) { return; } this.BtnNormal.SetActive(true); if (this.mQuests.Count <= 0 || this.CountQuests(QuestDifficulties.Elite) > 0) { return; } ((Selectable)this.BtnNormal.GetComponentInChildren <Button>()).set_interactable(false); ((Behaviour)this.BtnNormal.GetComponentInChildren <Button>()).set_enabled(false); M0 componentInChildren = this.BtnNormal.GetComponentInChildren <Image>(); ColorBlock colors = ((Selectable)this.BtnNormal.GetComponentInChildren <Button>()).get_colors(); // ISSUE: explicit reference operation Color normalColor = ((ColorBlock)@colors).get_normalColor(); ((Graphic)componentInChildren).set_color(normalColor); }
public void Activated(int pinID) { switch (pinID) { case 0: this.Initialize(); this.Refresh(); if (HomeWindow.GetRestorePoint() == RestorePoints.ReplayQuestList && this.Resumable(MonoSingleton <GameManager> .Instance.FindQuest((string)GlobalVars.ReplaySelectedQuestID))) { FlowNode_GameObject.ActivateOutputLinks((Component)this, 50); } HomeWindow.SetRestorePoint(RestorePoints.Home); break; case 1: this.Refresh(); break; } }
private bool Refresh(QuestDifficulties difficulty) { if (GlobalVars.RankingQuestSelected) { GlobalVars.RankingQuestSelected = false; this.mIsQuestsRefreshed = true; if (!this.RefreshRankingQuests()) { return(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BackButton, (UnityEngine.Object)null)) { this.BackButton.SetActive(false); } } else { if (!this.RefreshQuests()) { return(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BackButton, (UnityEngine.Object)null)) { this.BackButton.SetActive(true); } } if (difficulty == QuestDifficulties.Normal && !this.ExistsQuest(QuestDifficulties.Normal)) { difficulty = QuestDifficulties.Elite; } if (difficulty == QuestDifficulties.Elite && !this.ExistsQuest(QuestDifficulties.Elite)) { difficulty = QuestDifficulties.Extra; } if (difficulty == QuestDifficulties.Extra && !this.ExistsQuest(QuestDifficulties.Extra)) { difficulty = QuestDifficulties.Normal; } this.mDifficultyFilter = difficulty; this.RefreshItems(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ScrollRect, (UnityEngine.Object)null)) { this.ScrollRect.set_normalizedPosition(Vector2.get_one()); if (HomeWindow.GetRestorePoint() == RestorePoints.QuestList && !string.IsNullOrEmpty(GlobalVars.LastPlayedQuest.Get()) && ((QuestStates)GlobalVars.LastQuestState == QuestStates.Cleared && QuestListV2.mScrollPosCache.ContainsKey(this.ListID))) { this.mSetScrollPos = 2; this.mNewScrollPos = QuestListV2.mScrollPosCache[this.ListID]; QuestListV2.mScrollPosCache.Remove(this.ListID); HomeWindow.SetRestorePoint(RestorePoints.Home); } } this.RefreshButtons(difficulty); switch (difficulty) { case QuestDifficulties.Normal: if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BtnNormal, (UnityEngine.Object)null) && !this.ExistsQuest(QuestDifficulties.Elite) && !this.ExistsQuest(QuestDifficulties.Extra)) { this.BtnNormal.SetActive(false); break; } break; case QuestDifficulties.Elite: if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BtnElite, (UnityEngine.Object)null) && !this.ExistsQuest(QuestDifficulties.Extra) && !this.ExistsQuest(QuestDifficulties.Normal)) { this.BtnElite.SetActive(false); break; } break; default: if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BtnExtra, (UnityEngine.Object)null) && !this.ExistsQuest(QuestDifficulties.Normal) && !this.ExistsQuest(QuestDifficulties.Elite)) { this.BtnExtra.SetActive(false); break; } break; } return(true); }