コード例 #1
0
        private void StartPick(int i)
        {
            if (onDeactivateGizmos != null)
            {
                onDeactivateGizmos.Invoke();
            }
            pickingVertexIndex = i;
            pickingVertex      = true;
            for (int j = 0; j < vertexInfos.Length; j++)
            {
                vertexInfos[j].coordsBforeEdit = vertexInfos[j].currentCoords;
                if (j != i)
                {
                    vertexInfos[j].DisableUIElements();
                }
            }

            if (!vertexPicker)
            {
                vertexPicker = Instantiate(vertexPickerPrefab).GetComponentInChildren <CapsuleRay>();
                vertexPicker.SetCamera(CVSPUIManager.GetEditorCamera());
            }
            vertexPicker.SetActive(true);
            vertexInfos[i].oldCoords = vertexInfos[i].currentCoords;
            selectedHighlight.SetActive(true);
            Vector3 pos = selectedHighlight.transform.position;

            StopAllCoroutines();
            StartCoroutine(CVSPUIUtils.UIMovementCoroutine(selectedHighlight, 0.15f, new Vector3(pos.x, vertexInfos[i].parentObject.position.y, pos.z)));
        }
コード例 #2
0
        private void PickNext()
        {
            vertexInfos[pickingVertexIndex].DisableUIElements();
            pickingVertexIndex = (pickingVertexIndex + 1) % vertexInfos.Length;
            if (pickingVertexIndex == deletedIndex)
            {
                pickingVertexIndex = (pickingVertexIndex + 1) % vertexInfos.Length;
            }
            vertexInfos[pickingVertexIndex].EnableUIElements();
            Vector3 pos = selectedHighlight.transform.position;

            StopAllCoroutines();
            StartCoroutine(CVSPUIUtils.UIMovementCoroutine(selectedHighlight, 0.15f, new Vector3(pos.x, vertexInfos[pickingVertexIndex].parentObject.position.y, pos.z)));
        }