16. タップテンポ( ) readonly List<float> timeSteps = new List<float>(); float average; void Update() { if (Input.GetKeyDown(KeyCode.Space)) { if (timeSteps.Count > 0 && timeSteps.Last() < Time.time - 2) timeSteps.Clear(); timeSteps.Add(Time.time); average = 0; for (var i = 1; i < timeSteps.Count; ++i) average += timeSteps[i] - timeSteps[i - 1]; average /= timeSteps.Count - 1; } if (timeSteps.Count > 2)