public void RemoveStackableMapIcon(StackableMapIcon icon) { if (this.m_icons.Contains(icon)) { if (this.GetIconCount() == 1) { StackableMapIconManager.RemoveStackableMapIconContainer(this); Object.Destroy(base.gameObject); return; } this.m_icons.Remove(icon); } this.UpdateAppearance(); }
private void UpdateAppearance() { if (this.m_icons == null || this.GetIconCount() == 0) { StackableMapIconManager.RemoveStackableMapIconContainer(this); Object.Destroy(base.gameObject); return; } this.ShowIconArea(false); if (this.GetIconCount() == 1) { this.m_countainerPreviewIconsGroup.SetActive(false); this.ShowIconArea(true); this.ShowIconAreaBG(false); } else { this.m_countainerPreviewIconsGroup.SetActive(true); this.ShowIconAreaBG(true); } this.m_iconCount.text = string.Empty + this.GetIconCount(); base.gameObject.name = "IconContainer (" + ((this.GetIconCount() <= 0) ? "Single" : (string.Empty + this.GetIconCount())) + ")"; base.gameObject.SetActive(true); }
private void Awake() { StackableMapIconManager.s_instance = this; this.m_containers = new List <StackableMapIconContainer>(); }
public void RegisterWithManager(int startLocationMapID) { this.m_startLocationMapID = startLocationMapID; StackableMapIconManager.RegisterStackableMapIcon(this); }