Skip to content
Snippets Groups Projects
DefaultScroll.cs 623 B
Newer Older
  • Learn to ignore specific revisions
  • BenniHome's avatar
    BenniHome committed
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
        [CreateAssetMenu(fileName = "new DefaultScroll", menuName = "Inventory System/Items/DefaultScroll")]
    public class DefaultScroll : ItemObject
    {
    
    
        public GameObject IconPrefab;
        public GameObject UsagePrefab;
    
    BenniHome's avatar
    BenniHome committed
        public void Awake()
        {
           type = ItemType.DefaultScroll;
        }
    
    
        //prefab should be "DefaultScrollDisplay"
        public override  GameObject CreateDisplay(Transform transform, GameObject prefab){
             var obj = Instantiate(prefab, Vector3.zero, Quaternion.identity, transform);
             return obj;
        }
    
    
    BenniHome's avatar
    BenniHome committed
    }