コード例 #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.tag == "Player")
     {
         inventparent.AddItemToInvent(icon, itemprefab, Itemname, amount, ItemDescription, type);
         Debug.Log("Got " + Itemname);
         Destroy(gameObject); //Destroy self after use
     }
 }
コード例 #2
0
ファイル: PickUpPlacedMines.cs プロジェクト: nasa03/RSG
 public void Interact()
 {
     inventparent.AddItemToInvent(icon, itemprefab, Itemname, amount, ItemDescription, type);
     Debug.Log("Got " + Itemname);
     Destroy(gameObject); //Destroy self after use
 }