void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.CompareTag("Collectable_Apple")) { // play the pickup sound myAudioSource.clip = pickupSFX; myAudioSource.Play(); // move the pickup to a new location pickupSpawner.Pickup_SetRandomPosition(other.transform); // now make the total of the body count 1 longer bodyCount++; gameManager.IncreaseScore(); gameManager.SpeedUpGame(); } }