Forum begins after the advertisement:


[Part 34] Scripts not shown in the video

Home Forums Video Game Tutorial Series Creating a Farming RPG in Unity [Part 34] Scripts not shown in the video

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #18618
    Jonathan Teo
    Level 18
    Moderator
    Helpful?
    Up
    0
    ::

    Here’s the additional functions not shown in the video

    StorageManager.cs

     /// <summary>
        /// Set the slot data of the currently open storage container
        /// </summary>
        /// <param name="index">The index to change</param>
        /// <param name="slotData">The slot data</param>
        public static void SetSlotData(int index, ItemSlotData slotData)
        {
            GetStorageList(StorageType)[index] = new ItemSlotData(slotData);
        }
    
    public static void TransferItems(int slotIndex, InventorySlot.InventoryType inventoryType)
        {
            //Storage to Inventory
            if (inventoryType == InventorySlot.InventoryType.Storage)
            {
                StorageToInventory(slotIndex);
                return; 
            }
            //Inventory to Storage
            InventoryToStorage(slotIndex); 
    
    
        }
    
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: