/// <summary> /// 頂点の削除 /// </summary> private void RemoveVertex(int index) { int count = renderer.GetVertexCount(); if (connected && count <= 4) { return; } else if (count == 1) { //最後の頂点を削除 Exit(); } //削除処理 if (index == 0 && connected) { Vector2 point = renderer.GetVertex(1); renderer.Change(count - 1, point); } renderer.Remove(index); HideMarkers(); IndicateRemoveMarkers(renderer.GetVertices()); }
/// <summary> /// 予告線の設定 /// </summary> private void SetNoticeLine() { int count = renderer.GetVertexCount(); if (count == 0) { renderer.SetSubVertices(null); return; } //予告線の更新 Vector2 mPoint; editor.GetMousePoint(out mPoint); //スナップ Vector2 snapPoint; if (editor.supporter.Snap(mPoint, out snapPoint)) { mPoint = snapPoint; } //補助線の描画 renderer.SetSubVertices(renderer.GetVertex(count - 1), mPoint); }