private void AddCurrentQuestTile(Achievement achieveQuest, int slot) { GameObject go = (GameObject)GameUtils.Instantiate(this.m_questTilePrefab, this.m_questBones[slot].gameObject, true); SceneUtils.SetLayer(go, this.m_questBones[slot].gameObject.layer); go.transform.localScale = Vector3.one; QuestTile component = go.GetComponent <QuestTile>(); component.SetupTile(achieveQuest); component.SetCanShowCancelButton(true); this.m_currentQuests.Add(component); }
private void ShowActiveQuests() { List <Achievement> activeQuests = AchieveManager.Get().GetActiveQuests(false); if (activeQuests.Count < 1) { this.m_allCompletedCaption.gameObject.SetActive(true); } else { this.m_headlineBanner.gameObject.SetActive(true); if (this.m_showRequestData.m_fromLogin) { this.m_headlineBanner.SetText(GameStrings.Get("GLUE_QUEST_NOTIFICATION_HEADER")); } else { this.m_headlineBanner.SetText(GameStrings.Get("GLUE_QUEST_NOTIFICATION_HEADER_NEW_ONLY")); } if (AchieveManager.Get().HasUnlockedFeature(Achievement.UnlockableFeature.DAILY_QUESTS)) { this.m_questCaption.Text = GameStrings.Get("GLUE_QUEST_NOTIFICATION_CAPTION"); } else { this.m_questCaption.Text = string.Empty; } this.m_currentQuests = new List <QuestTile>(); float x = 0.4808684f; float num2 = this.m_placementCollider.transform.position.x - this.m_placementCollider.GetComponent <Collider>().bounds.extents.x; float num3 = this.m_placementCollider.bounds.size.x / ((float)activeQuests.Count); float num4 = num3 / 2f; bool flag = false; for (int i = 0; i < activeQuests.Count; i++) { Achievement quest = activeQuests[i]; bool flag2 = quest.IsNewlyActive(); float y = 180f; if (flag2) { y = 0f; this.DoInnkeeperLine(quest); } GameObject go = UnityEngine.Object.Instantiate <GameObject>(this.m_questTilePrefab.gameObject); SceneUtils.SetLayer(go, GameLayer.UI); go.transform.position = new Vector3(num2 + num4, this.m_placementCollider.transform.position.y, this.m_placementCollider.transform.position.z); go.transform.parent = base.transform; go.transform.localEulerAngles = new Vector3(90f, y, 0f); go.transform.localScale = new Vector3(x, x, x); QuestTile component = go.GetComponent <QuestTile>(); component.SetupTile(quest); this.m_currentQuests.Add(component); num4 += num3; if (flag2) { flag = true; this.FlipQuest(component); } } if (flag) { SoundManager.Get().LoadAndPlay("new_quest_pop_up"); } else { SoundManager.Get().LoadAndPlay("existing_quest_pop_up"); } } }