private void OnCollisionEnter(Collision other) { Hit hitObj = other.gameObject.GetComponent <Hit>(); if (hitObj != null) { hitObj.Accept(new HitEffectSpawner(), other.contacts[0].point); } Debug.Log("Hit"); Destroy(gameObject); }