using System.Collections; using System.Collections.Generic; using UnityEngine; /// /// This item factory literally just takes a handcrafted list of items and populates the model with that! /// [CreateAssetMenu]//Allows creating ViewConfig objects in Assets -> Create menu in the Unity Editor public class ScriptedItemFactory : ItemFactory { public List Items; public override void PopulateModel(ShopModel model) { foreach (var item in Items) { model.inventory.AddItem(new Item(item.name,item.Sprite.name,item.Price)); } } }