public void OnCollisionEnter2D(Collision2D c) { ScoreCounter counter = scoreCounter.GetComponent <ScoreCounter>(); counter.CountUp(); Destroy(gameObject); }