void CalculAnimation() { for (int i = 0; i < nbKeys; i++) { allValues[i] = randomizeValues(defaultValues.Length); } calculInterpolation(); NA_AnimateSynthTwister anim = GetComponent <NA_AnimateSynthTwister>(); anim.SetValuesAndInterpolation(allValues, interpolatePositions, nbFrames, nbKeys); NA_Simple_CurveMaker cmk = GetComponent <NA_Simple_CurveMaker>(); cmk.StartCurveMaker(nbPoints, nbCircles, amplitude, material); }
void BuildSynthTwister() { for (int i = 0; i < nbKeys; i++) { allValues[i] = randomizeValues(defaultValues.Length); } calculInterpolation(); GameObject newTwister = GameObject.Instantiate(twister); newTwister.transform.localScale = new Vector3(scale, scale, scale); newTwister.transform.position = transform.position; NA_AnimateSynthTwister anim = newTwister.GetComponent <NA_AnimateSynthTwister>(); anim.SetValuesAndInterpolation(allValues, interpolatePositions, nbFrames, nbKeys); NA_Simple_CurveMaker cmk = newTwister.GetComponent <NA_Simple_CurveMaker>(); cmk.StartCurveMaker(nbPoints, nbCircles, amplitude, material); }