예제 #1
0
    void SetDragPlaneMode(DragPlaneMode mode)
    {
        switch (mode)
        {
        case DragPlaneMode.XY:
            RestoreInitialPositions();
            dragSphere.gameObject.SetActive(false);
            dragPlane.gameObject.SetActive(false);
            inputMgr.dragPlaneType = TBInputManager.DragPlaneType.XY;
            break;

        case DragPlaneMode.Plane:
            RestoreInitialPositions();
            dragSphere.gameObject.SetActive(false);
            dragPlane.gameObject.SetActive(true);
            inputMgr.dragPlaneCollider = dragPlane;
            inputMgr.dragPlaneType     = TBInputManager.DragPlaneType.UseCollider;
            break;

        case DragPlaneMode.Sphere:
            RestoreInitialPositions();
            dragSphere.gameObject.SetActive(true);
            dragPlane.gameObject.SetActive(false);
            inputMgr.dragPlaneCollider = dragSphere;
            inputMgr.dragPlaneType     = TBInputManager.DragPlaneType.UseCollider;
            break;
        }

        dragPlaneMode = mode;
    }
    void SetDragPlaneMode( DragPlaneMode mode )
    {
        switch( mode )
        {
            case DragPlaneMode.Camera:
                RestoreInitialPositions();
                dragSphere.gameObject.active = false;
                dragPlane.gameObject.active = false;
                inputMgr.dragPlaneType = TBInputManager.DragPlaneType.Camera;
                break;

            case DragPlaneMode.XY:
                RestoreInitialPositions();
                dragSphere.gameObject.active = false;
                dragPlane.gameObject.active = false;
                inputMgr.dragPlaneType = TBInputManager.DragPlaneType.XY;
                break;

            case DragPlaneMode.Plane:
                RestoreInitialPositions();
                dragSphere.gameObject.active = false;
                dragPlane.gameObject.active = true;
                inputMgr.dragPlaneCollider = dragPlane;
                inputMgr.dragPlaneType = TBInputManager.DragPlaneType.UseCollider;
                break;

            case DragPlaneMode.Sphere:
                RestoreInitialPositions();
                dragSphere.gameObject.active = true;
                dragPlane.gameObject.active = false;
                inputMgr.dragPlaneCollider = dragSphere;
                inputMgr.dragPlaneType = TBInputManager.DragPlaneType.UseCollider;
                break;
        }

        dragPlaneMode = mode;
    }