Aetheria/Assets/Scripts/ServerShared/EnumDictionary.cs
2026-06-13 11:14:38 +01:00

12 lines
247 B
C#

using System;
public class EnumDictionary<E, T> where E : Enum
{
public T[] Values;
public EnumDictionary()
{
Values = new T[Enum.GetNames(typeof(E)).Length];
}
public T this[E key] => Values[Convert.ToInt32(key)];
}