コード例 #1
0
ファイル: OnGroundItem.cs プロジェクト: savik-games/Cave
    static public OnGroundItem CreateOnGround(ItemSO item, Vector3 pos)
    {
        pos.z = 0;
        GameObject   go      = Instantiate(OnGroundItemsList.instance.GetItemPrefab(item), pos, Quaternion.identity);
        OnGroundItem newItem = go.GetComponent <OnGroundItem>();

        newItem.Item.Count = item.Count;
        return(newItem);
    }
コード例 #2
0
ファイル: ItemSlot.cs プロジェクト: savik-games/Cave
 void DropItemOnGround(Vector3 newItemPos)
 {
     OnGroundItem.CreateOnGround(item, newItemPos);
     InventoryUI.Inventory.Items[invId] = null;
     InventoryUI.UpdateUI();
 }