コード例 #1
0
        public void StartAction(Render render, Selection sel)
        {
            StopAction();

            switch (mode)
            {
            case EMode.Create:
                if (sel is EdgeSelection)
                {
                    current_action = new ExtrudeEdgeAction(render, controller, (EdgeSelection)sel);
                    return;
                }
                break;

            case EMode.Move:
                if (sel is VertexSelection)
                {
                    current_action = new MoveVertexAction(render, controller, (VertexSelection)sel);
                    return;
                }
                if (sel is EdgeSelection)
                {
                    current_action = new MoveEdgeAction(render, controller, (EdgeSelection)sel);
                    return;
                }
                break;
            }
            throw new System.NotImplementedException();
        }
コード例 #2
0
 public void StopAction()
 {
     if (current_action != null)
     {
         current_action.Stop();
         current_action = null;
     }
 }