using UnityEngine;

public class DCub : MonoBehaviour {
  public GameM gm;
  void OnCollisionEnter(Collision c) {
    if (c.gameObject.name == "Player") {
      Destroy(this.transform.gameObject);
      Debug.Log("Item collected!");
      gm.Items += 1;
    }
  }
}