void OnClick(ZLine line) { List <ZLine> l = ZMapManager.instance.GetBigLine(line); bool isDelete = false; foreach (ZLine zl in ZLine.lines) { if (l.Contains(zl)) { continue; } zl.isChoose = false; zl.isUse = false; } foreach (ZLine zl in l) { if (zl.isChoose && currentRemoveLine > 0) { zl.Destroy(); isDelete = true; } else { zl.isChoose = true; } } if (isDelete) { isDelete = false; currentRemoveLine--; ClipController.clips.OnErase(); } }
public List <ZLine> GetBigLine(ZLine line) { bigLine = new List <ZLine>(); bigPoint = new Stack <ZPoint>(); line.isUse = true; bigLine.Add(line); DFSGetBigLine(line.points[0], line.points[1]); foreach (ZLine l in ZLine.lines) { l.isUse = false; } return(bigLine); }
public bool AddLine(ZLine line) { bool circle = false; circlePoint = new Stack <ZPoint>(); line.isUse = true; circle = DFSAddLine(line.points[0], line.points[1]); foreach (ZLine l in ZLine.lines) { l.isUse = false; } return(circle); }