itemDatabase.cs 1.33 KB
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class itemDatabase : MonoBehaviour
{
    public List<Item> items = new List<Item>();
    private Sprite[] sprites;
    private void Start()
    {
        //멀티플 스프라이트 가져오기
        sprites = Resources.LoadAll<Sprite>("items/34x34icons180709");


        items.Add(new Item(sprites[42], "Exp_potion_S", 1001,0, "small size exp potion. Add 10 exp", 10, Item.ItemType.Exp_potion));
        items.Add(new Item(sprites[35], "Exp_potion_M", 1002, 0, "middle size exp potion. Add 30 exp", 30, Item.ItemType.Exp_potion));
        items.Add(new Item(sprites[49], "Exp_potion_L", 1003, 0, "large size exp potion. Add 50 exp", 50, Item.ItemType.Exp_potion));
        items.Add(new Item(sprites[28], "Exp_potion_XL", 1004, 0, "extra large size exp potion. Add 100 exp", 100, Item.ItemType.Exp_potion));

        items.Add(new Item(sprites[1], "희망의 조각", 2001, 0, "희망이 담긴 작은 조각. 각성에 이용할수있습니다. ", 0, Item.ItemType.Evol_Piece));
        items.Add(new Item(sprites[2], "성찰의 조각", 2002, 0, "반성이 담긴 작은 조각. 각성에 이용할수있습니다. ", 100, Item.ItemType.Evol_Piece));

        //DB를 만든다면 이게 필요없다고 함. 원하는 아이템 이렇게 넣어주면된다.
    }
}