示例#1
0
    public IEnumerator TurnOffAllModes()
    {
        GeoModeActive = false;
        ContexMenu.Instance.GeometryModeActive = false;
        VertexModeActive = false;
        EdgeModeActive   = false;
        FaceModeActive   = false;
        PR_FACE_GO.SetActive(FaceModeActive);
        PR_EDGE_GO.SetActive(EdgeModeActive);
        PR_VERTEX_GO.SetActive(VertexModeActive);
        // Remove targets.
        Manager.Instance.GIZMO.ClearTargets();

        yield return(null);
    }
示例#2
0
    /// <summary>
    /// Coroutine that activates the geometry selection mode.
    /// </summary>
    /// <returns></returns>
    public IEnumerator TurnOnCube()
    {
        GeoModeActive = true;
        ContexMenu.Instance.GeometryModeActive = true;
        VertexModeActive = false;
        EdgeModeActive   = false;
        FaceModeActive   = false;
        PR_FACE_GO.SetActive(FaceModeActive);
        PR_EDGE_GO.SetActive(EdgeModeActive);
        PR_VERTEX_GO.SetActive(VertexModeActive);
        // Add the whole geometry to Gizmo array.
        Manager.Instance.GIZMO.ClearAndAddTarget(this.transform);
        // Save the position, used during movement transformation.
        Manager.Instance.GIZMO.SaveTargetPrevPosition();

        yield return(null);
    }
示例#3
0
 private void ActivateFace(bool state)
 {
     FaceModeActive = state;
     PR_FACE_GO.SetActive(state);
 }