예제 #1
0
        private static void OnKeyboardEventCalled(KeyEventType type)
        {
            switch (type)
            {
            case KeyEventType.SwitchToObjectEditMode:       EditMode = CSGEditMode.Object;                  break;

            case KeyEventType.SwitchToPivotEditMode:        EditMode = CSGEditMode.Pivot;                   break;

            case KeyEventType.SwitchToShapeEditMode:        EditMode = CSGEditMode.ShapeEdit;               break;

            case KeyEventType.SwitchToSurfaceEditMode:      EditMode = CSGEditMode.SurfaceEdit;             break;

            case KeyEventType.FreeBuilderMode:                      EditMode = CSGEditMode.FreeDraw;                break;

            case KeyEventType.RevolvedShapeBuilderMode:     EditMode = CSGEditMode.RevolvedShape;   break;

            case KeyEventType.BoxBuilderMode:                       EditMode = CSGEditMode.Box;                             break;

            case KeyEventType.CylinderBuilderMode:          EditMode = CSGEditMode.Cylinder;                break;

            case KeyEventType.TorusBuilderMode:                     EditMode = CSGEditMode.Torus;                   break;

            case KeyEventType.HemisphereBuilderMode:        EditMode = CSGEditMode.Hemisphere;              break;

            case KeyEventType.SphereBuilderMode:            EditMode = CSGEditMode.Sphere;                  break;

            case KeyEventType.CapsuleBuilderMode:           EditMode = CSGEditMode.Capsule;                 break;

            case KeyEventType.StadiumBuilderMode:           EditMode = CSGEditMode.Stadium;                 break;

            case KeyEventType.PathedStairsBuilderMode:      EditMode = CSGEditMode.PathedStairs;    break;

            case KeyEventType.LinearStairsBuilderMode:      EditMode = CSGEditMode.LinearStairs;    break;

            case KeyEventType.SpiralStairsBuilderMode:      EditMode = CSGEditMode.SpiralStairs;    break;
            }
        }
 public CSGEditModeItem(CSGEditMode value, GUIContent content)
 {
     this.value = value; this.content = content;
 }
 void RememberSelection()
 {
     prevSelection          = Selection.objects;
     prevEditMode           = CSGEditModeManager.EditMode;
     Selection.activeObject = null;
 }
 void ClearStoredSelection()
 {
     prevSelection = null;
     prevEditMode  = CSGEditMode.Object;
 }
 private static void OnEditModeChanged(CSGEditMode prevEditMode, CSGEditMode newEditMode)
 {
     CSGOutlineRenderer.Instance.OnEditModeChanged(prevEditMode, newEditMode);
 }