public static bool ContainsIcon(Vector3 pos) { PeMap.ILabel pl = PeMap.LabelMgr.Instance.Find(item => { DestroyedLabel l = item as DestroyedLabel; if (l != null && l.pos == pos) { return(true); } return(false); }); if (pl != null) { return(true); } return(false); }
public static void AddDestroyedTownIcon(VArtifactTown vat) { if (vat != null) { if (vat.isEmpty) { return; } if (!DestroyedLabel.ContainsIcon(vat.TransPos)) { UnknownLabel.Remove(vat.TransPos); DestroyedLabel dl = new DestroyedLabel(vat); if (!destroyedTownLabel.ContainsKey(dl.pos)) { destroyedTownLabel.Add(dl.pos, dl); } } } }
public static void DestroyTownIcon(VArtifactTown vat) { if (vat != null) { if (vat.type == VArtifactType.NpcTown) { npcTownLabel.Remove(vat.TransPos); } else { nativeCampLabel.Remove(vat.TransPos); } TownLabel.Remove(vat.TransPos); if (!DestroyedLabel.ContainsIcon(vat.TransPos)) { UnknownLabel.Remove(vat.TransPos); DestroyedLabel dl = new DestroyedLabel(vat); if (!destroyedTownLabel.ContainsKey(dl.pos)) { destroyedTownLabel.Add(dl.pos, dl); } } } }