void Update() { float time = Time.time; for (int i = 0; i < points.Length; i++) { Transform point = points[i]; Vector3 position = point.localPosition; if (function == 0) { position.y = FunctionLibrary.Wave(position.x, time); } else { position.y = FunctionLibrary.MultiWave(position.x, time); } point.localPosition = position; } }