public void Undo()
 {
     if (lines.Count > 0)
     {
         Line.Line l = lines[lines.Count - 1];
         lines.Remove(l);
         GameObject.DestroyImmediate(l.gameObject);
     }
 }
 public void AddLine(Line.Line line)
 {
     lines.Add(line);
 }
 public void Delete(Line.Line l)
 {
     lines.Remove(l);
     GameObject.DestroyImmediate(l.gameObject);
 }
 void OnLineEnded(Line.Line line)
 {
     LineEnded?.Invoke(line);
 }
        private void OnLineCreated(Line.Line line)
        {
            lines.Add(line);

            LineCreated?.Invoke(line);
        }