Skip to content
Snippets Groups Projects
Select Git revision
  • JS-based-scroll-rendering
  • master default
  • Paul_Marius_Level
  • Paul_Marius_2
  • Paul_Marius
  • Andi_Mark
  • be-UnityWebView
  • gitignoreFrameitServer
  • ZimmerBSc
  • Bugfix_StageLoading
  • stages
  • MAZIFAU_Experimental
  • tsc/coneworld
  • tsc/fact-interaction
  • marcel
  • MaZiFAU_TopSort
  • mergeHelper
  • zwischenSpeichern
  • tempAndrToMaster
  • SebBranch
  • 3.0
  • v2.1
  • v2.0
  • v1.0
24 results

Inventory.cs

Blame
  • Inventory.cs 1004 B
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    
    [CreateAssetMenu(fileName = "New Inventory", menuName= "Inventory System/Inventory" )]
    public class Inventory : ScriptableObject
    {
       public List<InventorySlotFact> Facts = new List<InventorySlotFact>();
       public List<InventorySlotScroll> Scrolls = new List<InventorySlotScroll>();
    
       public void AddFact(ItemObject fact){
         Facts.Add(new InventorySlotFact(fact));
       }
    
       public void AddScroll(DefaultScroll scroll){
          Scrolls.Add(new InventorySlotScroll(scroll));
       }
    }
    [System.Serializable]
    public class InventorySlotFact{
       public ItemObject item;
       public bool isDisplayed;
    
       public InventorySlotFact(ItemObject _item){
          item = _item;
          isDisplayed = false;
       }
    
    }
    
    [System.Serializable]
    public class InventorySlotScroll{
       public DefaultScroll item;
       public bool isDisplayed;
    
       public InventorySlotScroll( DefaultScroll _item){
          item = _item;
          isDisplayed = false;
       }
    }