void DropItems(List <ItemData> dropItems) { foreach (ItemData dropItem in dropItems) { gameItemDrop.DropItemIntoWorld(dropItem, dropTransform.position, ItemPrefabInitilizer.GetPrefabToInstantiate(dropItem), IsDropSingleAmount); } }
void DropItems(List <ItemData> dropItems) { foreach (ItemData dropItem in dropItems) { ItemData data = dropItem.GetComponent <ItemData>(); GameObject model; if (prefabinitilizer != null) { model = prefabinitilizer.GetPrefabToInstantiate(data, defaultDropModelPrefab); } else if (GlobalPrefabInitilizer.prefabInit != null) { model = GlobalPrefabInitilizer.prefabInit.GetPrefabToInstantiate(data, defaultDropModelPrefab); } else { model = defaultDropModelPrefab; } gameItemDrop.DropItemIntoWorld(data, dropTransform.position, model); DestroyObject(dropItem.gameObject); } }