private void FlipQuest(QuestTile quest) { object[] args = new object[] { "amount", new Vector3(0f, 0f, 540f), "delay", 1, "time", 2f, "easeType", iTween.EaseType.easeOutElastic, "space", Space.Self }; Hashtable hashtable = iTween.Hash(args); iTween.RotateAdd(quest.gameObject, hashtable); }
private void ShowButtons(List <Quest> list) { for (int i = 0; i < list.Count; i++) { //-4.8f var iniPosHere = _scroll_Ini_PosGO.transform.localPosition + new Vector3(0, -_tileHeight * i, 0); var a = QuestTile.CreateTile(_content.gameObject.transform, list[i], iniPosHere, this); _btns.Add(a); } }
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); }
internal static QuestTile CreateTile(Transform container, Quest val, Vector3 iniPos, QuestWindow win) { QuestTile obj = null; var root = ""; obj = (QuestTile)Resources.Load(Root.quest_Tile, typeof(QuestTile)); obj = (QuestTile)Instantiate(obj, new Vector3(), Quaternion.identity); var iniScale = obj.transform.localScale; obj.transform.SetParent(container); obj.transform.localPosition = iniPos; obj.transform.localScale = iniScale; obj.Value = val; obj.Window = win; return(obj); }
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"); } } }
internal QuestTileData(QuestTile questTile) { this.Vector3_0 = questTile.m_cancelButton.Transform.Position; this.Achievement = new AchievementData(questTile.m_quest); this.IsCancelable = questTile.m_cancelButtonRoot.Active; }