private void OnCollisionEnter(Collision other) { PlatformDestroyer hit = other.collider.gameObject.GetComponent <PlatformDestroyer>(); if (hit != null) { _platforms.Hit(); } }