浏览代码

actually destroy the gameobject an not the component

/main
circa94 4 年前
当前提交
d90d245d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      UOP1_Project/Assets/Inventory/Scripts/InventoryController.cs

2
UOP1_Project/Assets/Inventory/Scripts/InventoryController.cs


if (other.TryGetComponent<ItemInstance>(out ItemInstance itemInstance))
{
_inventory.Add(itemInstance.Item);
Destroy(itemInstance);
Destroy(itemInstance.gameObject);
}
}
}
正在加载...
取消
保存