public void RemoveStackableMapIcon(StackableMapIcon icon)
 {
     if (this.m_icons.Contains(icon))
     {
         if (this.GetIconCount() == 1)
         {
             StackableMapIconManager.RemoveStackableMapIconContainer(this);
             Object.DestroyImmediate(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.DestroyImmediate(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);
 }
Beispiel #3
0
 private void Awake()
 {
     StackableMapIconManager.s_instance = this;
     this.m_containers = new List <StackableMapIconContainer>();
 }
Beispiel #4
0
 public void RegisterWithManager(int startLocationMapID)
 {
     this.m_startLocationMapID = startLocationMapID;
     StackableMapIconManager.RegisterStackableMapIcon(this);
 }
 private void OnDestroy()
 {
     StackableMapIconManager.RemoveStackableMapIconContainer(this);
 }
 public void RegisterWithManager()
 {
     StackableMapIconManager.RegisterStackableMapIcon(this);
 }