예제 #1
0
    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);
        }
    }
예제 #2
0
 // Start is called before the first frame update
 void Start()
 {
     Feats = FindObjectOfType <features>();
     Feats.unlockFeature(FeatureToUnlock);
 }