public object Clone() { ActiveArea aa = (ActiveArea)base.Clone(); //can not be two identical id string id = aa.getId() + "-" + (new System.Random().Next(1000).ToString()); aa.setId(id); aa.conditions = (conditions != null ? (Conditions)conditions.Clone() : null); aa.height = height; aa.width = width; aa.x = x; aa.y = y; aa.influenceArea = (influenceArea != null ? (InfluenceArea)influenceArea.Clone() : null); aa.rectangular = rectangular; aa.Vector2s = (Vector2s != null ? new List <Vector2>() : null); foreach (Vector2 p in Vector2s) { aa.Vector2s.Add(new Vector2(p.x, p.y)); } return(aa); }
/** * Returns the id of the item. * * @return Item's id */ public string getId() { return(activeArea.getId()); }