private Vector2[] GetPolygonPos(Line2DRender lineRender) { Vector2[] polygon = new Vector2[lineRender.PointList.Count - 1]; for (int i = 0; i < lineRender.PointList.Count - 1; i++) { polygon[i] = new Vector2(lineRender.PointList[i].x, lineRender.PointList[i].y); } return(polygon); }
public static Line2DRender GetLineRender() { Line2DRender lineRender = new Line2DRender(); lineRender.Uid = GetRenderUid(); lineRender.Init(); return(lineRender); }
// Use this for initialization void Start() { _lineRender = GUIDebug.GetLineRender(); _lineRender.PointList = this.GetPointList(); _lineRender.Render(); _movingLineRender = GUIDebug.GetLineRender(); SetState(0); }