public override bool Equals(System.Object obj) { if (obj == null) { return(false); } InvisBuilding i = obj as InvisBuilding; return(Equals(this.id, i.id)); }
public void switchBuilding(InvisBuilding invis_building) { if (expand_view.activeSelf) { return; } if (this.polygon_id == 0) { enableView(); } else { unhighlight(); pois.Clear(); } this.polygon_id = invis_building.id; this.invis_building = invis_building; addPois(); highlight(); if (pois.Count > 1) { min_poi_title.text = pois[0].basic_poi.original_name + " (+" + (pois.Count - 1) + " others)"; } else if (pois.Count == 1) { min_poi_title.text = pois[0].basic_poi.original_name; } if (pois.Count >= 1) { min_poi = pois[0]; min_poi_image.sprite = icon(pois[0].basic_poi.icon); } if (pois.Count == 0) { disableView(); return; } else if (!minimize_view.activeSelf) { enableView(); } // set polygon id }