// private void OnDisable() // { //#if UNITY_EDITOR // UnityEditor.EditorUtility.SetDirty(netDataObj); //#endif // } /// <summary> /// 更新点信息 /// </summary> private void UpdatePoints() { var roundspan = roundMax / roundCount; var angleSpan = 2 * Mathf.PI / (roundvetix - 1); for (int i = 0; i < roundCount; i++) { var b = roundspan * (i + 1); for (int j = 0; j < roundvetix; j++) { var angle = angleSpan * j; rounds[i][j] = OvalUtil.GetPosition(b, span, angle); } for (int j = 0; j < retios.Length; j++) { var upindex = FindClosestPoint(roundvetix, retios[j]); /*var up =*/ lines[j][roundCount + i] = rounds[i][upindex]; //曲线上面的点 lines[j][roundCount - i - 1] = rounds[i][roundvetix - upindex - 1]; //曲线下面的点 //if (renderData) netDataObj.TryInsetData(up, retios[j]); } } }
private void Update() { print(OvalUtil.GetRadian(transform.position, span)); }