private void OnCollisionEnter(Collision collision) { GameObject collidedObject = collision.collider.gameObject; Debug.Log(collidedObject.tag); if (collidedObject.tag == "Player") { Destroy(this.gameObject); feats.unlockFeature(featureToUnlock); //if (gm == null) //{ // gm = FindObjectOfType<GeneratorMap>(); // print("wuuuuuuuuut"); //} //AudioManager.Instance.ItemPickup.Play(transform.position); Instantiate(pickupAnim, this.transform.position, Quaternion.identity); } }
// Start is called before the first frame update void Start() { Feats = FindObjectOfType <features>(); Feats.unlockFeature(FeatureToUnlock); }