12 lines
294 B
C#
12 lines
294 B
C#
using UnityEngine;
|
|
using System.Collections.Generic;
|
|
|
|
public class ItemDatabase : MonoBehaviour
|
|
{
|
|
public static ItemDatabase Instance;
|
|
public List<ItemData> allItems;
|
|
|
|
void Awake() => Instance = this;
|
|
|
|
public ItemData GetItemByID(int id) => allItems.Find(x => x.itemID == id);
|
|
} |