canto/Assets/Scripts/SOAP/Collection/Database.cs

25 lines
419 B
C#

using System.Collections.Generic;
using UnityEngine;
namespace KitsuneCafe.SOAP
{
public interface IDatabase
{
string Name { get; }
}
public interface IDatabase<T> : IDatabase
{
IEnumerable<T> Rows { get; }
}
public class Database<T> : ScriptableObject, IDatabase<T>
{
public string Name => name;
[SerializeField]
private T[] rows;
public IEnumerable<T> Rows => rows;
}
}