示例#1
0
 protected private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Item")
     {
         if (other.bounds.size.x * other.bounds.size.y <= maxSize)
         {
             GameObject otherObject = other.gameObject;
             otherObject.SetActive(false);
             inventory.Add(otherObject);
         }
     }
 }
示例#2
0
文件: Body.cs 项目: Laboost/TRPG
 public void AddToItemInventory(Item item)
 {
     ItemInventory.Add(item);
 }