private void Awake() { rigid = GetComponent <Rigidbody>(); animator = GetComponent <Animator>(); previewCube.localScale = Vector3.one * (CubeMetrics.CUBE_SIDE_LENGTH + 0.01f); controlType = CharacherCubeControlType.reomve; cubeType = CubeType.debug; }
public void TriangualtePreview(PreviewMode previewMode, CubeOrientate orientate, CubeData data, CharacherCubeControlType type) { mode = previewMode; PreviewOrientate = orientate; controlType = type; Clear(); if (mode == PreviewMode.cube) { TriangulateCube(transform.position, data); } else { TriangulatePreviewWire(orientate); if (controlType == CharacherCubeControlType.add) { TriangualteAllCubes(orientate); } } Apply(); }