Example #1
0
        /// <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());
        }
Example #2
0
 /// <summary>
 /// 戻る
 /// </summary>
 private void Escape()
 {
     //頂点数が0確認
     if (renderer.GetVertexCount() == 0)
     {
         //終了
         Exit();
     }
     else
     {
         //全削除
         renderer.Clear();
         //スナップだけ残す
         SetSnap();
     }
 }