private void CheckScoreCollectible(Collider other) { if (other.gameObject.CompareTag("Collectible")) { other.gameObject.SetActive(false); } CollectibleData collectibleData = other.gameObject.GetComponent <CollectibleData>(); if (collectibleData != null) { _scoreMgr.AddScore(collectibleData.scoreValue); } }