아이템 드랍 및 인벤토리 기능 구현
This commit is contained in:
12
Assets/Scripts/GameBase/ItemDatabase.cs
Normal file
12
Assets/Scripts/GameBase/ItemDatabase.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user