public static void RemoveStackableMapIconContainer(StackableMapIconContainer container) { if (StackableMapIconManager.s_instance != null && StackableMapIconManager.s_instance.m_containers.Contains(container)) { StackableMapIconManager.s_instance.m_containers.Remove(container); } }
public void JustZoomToMission() { UiAnimMgr.instance.PlayAnim("MinimapPulseAnim", base.get_transform(), Vector3.get_zero(), 3f, 0f); Main.instance.m_UISound.Play_SelectMission(); if (StaticDB.garrMissionDB.GetRecord(this.m_garrMissionID) == null) { return; } AdventureMapPanel instance = AdventureMapPanel.instance; StackableMapIcon component = base.GetComponent <StackableMapIcon>(); StackableMapIconContainer stackableMapIconContainer = null; if (component != null) { stackableMapIconContainer = component.GetContainer(); AdventureMapPanel.instance.SetSelectedIconContainer(stackableMapIconContainer); } Vector2 tapPos; if (stackableMapIconContainer != null) { tapPos = new Vector2(stackableMapIconContainer.get_transform().get_position().x, stackableMapIconContainer.get_transform().get_position().y); } else { tapPos = new Vector2(base.get_transform().get_position().x, base.get_transform().get_position().y); } instance.CenterAndZoom(tapPos, null, true); }
private void Start() { this.m_pinchZoomContentManager.SetZoom(1f, false); this.m_guildChatSlider_Bottom.Hide(); StackableMapIconContainer[] componentsInChildren = this.m_missionAndWordQuestArea.GetComponentsInChildren <StackableMapIconContainer>(true); StackableMapIconContainer[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { StackableMapIconContainer stackableMapIconContainer = array[i]; Object.DestroyImmediate(stackableMapIconContainer.get_gameObject()); } this.InitMissionSites(); this.UpdateWorldQuests(); this.HandleBountyInfoUpdated(); Main expr_65 = Main.instance; expr_65.GarrisonDataResetFinishedAction = (Action)Delegate.Combine(expr_65.GarrisonDataResetFinishedAction, new Action(this.InitMissionSites)); Main expr_8B = Main.instance; expr_8B.MissionAddedAction = (Action <int, int>)Delegate.Combine(expr_8B.MissionAddedAction, new Action <int, int>(this.HandleMissionAdded)); Main expr_B1 = Main.instance; expr_B1.BountyInfoUpdatedAction = (Action)Delegate.Combine(expr_B1.BountyInfoUpdatedAction, new Action(this.HandleBountyInfoUpdated)); AllPopups.instance.EnableMissionDialog(); }
public static void RegisterStackableMapIcon(StackableMapIcon icon) { if (StackableMapIconManager.s_instance == null) { Debug.LogError("ERROR: RegisterStackableMapIcon with null s_instance"); return; } if (icon == null) { Debug.LogError("ERROR: RegisterStackableMapIcon with null icon"); return; } bool flag = false; foreach (StackableMapIconContainer stackableMapIconContainer in StackableMapIconManager.s_instance.m_containers) { if (!(stackableMapIconContainer == null)) { if (stackableMapIconContainer.gameObject.activeSelf) { if (stackableMapIconContainer.m_startLocationMapID == icon.m_startLocationMapID) { Rect worldRect = stackableMapIconContainer.GetWorldRect(); if (icon.GetWorldRect().Overlaps(worldRect)) { stackableMapIconContainer.AddStackableMapIcon(icon); icon.SetContainer(stackableMapIconContainer); StackableMapIconManager.s_instance.m_containers.Add(stackableMapIconContainer); flag = true; break; } } } } } if (!flag) { GameObject gameObject = Object.Instantiate <GameObject>(StackableMapIconManager.s_instance.m_stackableMapContainerPrefab); gameObject.transform.SetParent(icon.transform.parent, false); RectTransform component = gameObject.GetComponent <RectTransform>(); RectTransform component2 = icon.GetComponent <RectTransform>(); component.anchorMin = component2.anchorMin; component.anchorMax = component2.anchorMax; component.sizeDelta = icon.m_iconBoundsRT.sizeDelta; component.anchoredPosition = Vector2.zero; StackableMapIconContainer component3 = gameObject.GetComponent <StackableMapIconContainer>(); if (component3 != null) { component3.m_startLocationMapID = icon.m_startLocationMapID; component3.AddStackableMapIcon(icon); icon.SetContainer(component3); StackableMapIconManager.s_instance.m_containers.Add(component3); } else { Debug.LogError("ERROR: containerObj has no StackableMapIconContainer!!"); } } }
public static void RegisterStackableMapIcon(StackableMapIcon icon) { if (StackableMapIconManager.s_instance == null) { Debug.LogError("ERROR: RegisterStackableMapIcon with null s_instance"); return; } if (icon == null) { Debug.LogError("ERROR: RegisterStackableMapIcon with null icon"); return; } bool flag = false; using (List <StackableMapIconContainer> .Enumerator enumerator = StackableMapIconManager.s_instance.m_containers.GetEnumerator()) { while (enumerator.MoveNext()) { StackableMapIconContainer current = enumerator.get_Current(); if (!(current == null)) { if (current.get_gameObject().get_activeSelf()) { Rect worldRect = current.GetWorldRect(); if (icon.GetWorldRect().Overlaps(worldRect)) { current.AddStackableMapIcon(icon); icon.SetContainer(current); StackableMapIconManager.s_instance.m_containers.Add(current); flag = true; break; } } } } } if (!flag) { GameObject gameObject = Object.Instantiate <GameObject>(StackableMapIconManager.s_instance.m_stackableMapContainerPrefab); gameObject.get_transform().SetParent(icon.get_transform().get_parent(), false); RectTransform component = gameObject.GetComponent <RectTransform>(); RectTransform component2 = icon.GetComponent <RectTransform>(); component.set_anchorMin(component2.get_anchorMin()); component.set_anchorMax(component2.get_anchorMax()); component.set_sizeDelta(icon.m_iconBoundsRT.get_sizeDelta()); component.set_anchoredPosition(Vector2.get_zero()); StackableMapIconContainer component3 = gameObject.GetComponent <StackableMapIconContainer>(); if (component3 != null) { component3.AddStackableMapIcon(icon); icon.SetContainer(component3); StackableMapIconManager.s_instance.m_containers.Add(component3); } else { Debug.LogError("ERROR: containerObj has no StackableMapIconContainer!!"); } } }
public void SetSelectedIconContainer(StackableMapIconContainer container) { this.m_iconContainer = container; if (this.SelectedIconContainerChanged != null) { this.SelectedIconContainerChanged.Invoke(container); } }
public void OnClick() { Main.instance.m_UISound.Play_SelectWorldQuest(); UiAnimMgr.instance.PlayAnim("MinimapPulseAnim", base.transform, Vector3.zero, 2f, 0f); AllPopups.instance.ShowWorldQuestTooltip(this.m_questID); StackableMapIcon component = base.GetComponent <StackableMapIcon>(); if (component != null) { StackableMapIconContainer container = component.GetContainer(); AdventureMapPanel.instance.SetSelectedIconContainer(container); } }
private void HandleSelectedIconContainerChanged(StackableMapIconContainer container) { if (container == this) { if (this.GetCount() > 1) { this.ShowExplodedList(true); } } else { this.ShowExplodedList(false); } }
public void SetContainer(StackableMapIconContainer iconContainer) { this.m_iconContainer = iconContainer; }