예제 #1
0
 void DropItems(List <ItemData> dropItems)
 {
     foreach (ItemData dropItem in dropItems)
     {
         gameItemDrop.DropItemIntoWorld(dropItem, dropTransform.position, ItemPrefabInitilizer.GetPrefabToInstantiate(dropItem), IsDropSingleAmount);
     }
 }
예제 #2
0
    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);
        }
    }
예제 #3
0
    void ItemMoved(MoveMultipleItemsResponse moves, ItemData item)
    {
        foreach (MovedItemsInfo moveInfo in moves.movedItems)
        {
            DropMovedItem(item, moveInfo);
        }

        gameItemDrop.DropItemIntoWorld(item, DropTransform.position, CloudGoods.DefaultItemDrop, false);
    }
예제 #4
0
    void ItemMoved(MoveMultipleItemsResponse moves, ItemData item)
    {
        foreach (MovedItemsInfo moveInfo in moves.movedItems)
        {
            DropMovedItem(item, moveInfo);
        }

        gameItemDrop.DropItemIntoWorld(item, DropTransform.position, DropObjModel);
    }
예제 #5
0
    private void DropMovedItems(ItemData[] containerItems, MovedItemsInfo moveInfo)
    {
        foreach (ItemData data in containerItems)
        {
            if (data.stackID == moveInfo.OriginalStackID)
            {
                if (data.ownerContainer != null)
                {
                    data.ownerContainer.Remove(data, true);
                }

                data.stackID = moveInfo.NewStackID;

                itemDrop.DropItemIntoWorld(data, TransformForDropPosition.position, DropObjDefaultModel, false);
            }
        }
    }