private void OnEnable() { instance = FindObjectOfType <Demonstrator>(); measurement = FindObjectOfType <Measurement>(); if (EditorApplication.isPlaying) { parameter = instance.GetBall().param; } }
private void SamplePositionOfBall() { if (instance) { var currentBallHeight = instance.GetBall().transform.position.y; if (samples.Count >= 200) { samples.Dequeue(); samples.Enqueue(currentBallHeight); } else { samples.Enqueue(currentBallHeight); } } }