public void AcornCollected(JumpingGameCollectable collectedAcorn) { for (int i = 0; i <= Acorns.Length; i++) { if (Acorns[i] == collectedAcorn) { _collectedAcorns++; UI.CollectAcorn(i); break; } } }