public void StoreItem(int itemID) { if (!ItemList.ContainsKey(itemID)) { return; } Transform emptyGrid = GridPanelUI.FindEmptyGrid(); if (emptyGrid == null) { Debug.LogWarning("背包已满!"); return; } Item temp = ItemList[itemID]; CreateNewItem(temp, emptyGrid); //保存已获得的物品 m_GameModel.collectedItems_Temp.Add(ItemList[itemID]); }