void Update() { if (Input.GetKeyDown(KeyCode.R)) { ResetPositions(); } if (Input.GetKeyDown(KeyCode.F)) { foreach (var pin in pins) { pin.ForcePush(); } } var score = 0; foreach (var pin in pins) { if (pin.HaveFallen()) { ++score; pin.Register(); } } if (score > 0) { display.AddScore(score); } }