1
This commit is contained in:
20
Src/Unity/BitMask/ScriptableImplements.cs
Normal file
20
Src/Unity/BitMask/ScriptableImplements.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Net.BITKit.BitMask
|
||||
{
|
||||
public abstract class ScriptableImplements : ScriptableObject
|
||||
{
|
||||
public abstract Type[] Types { get; }
|
||||
public abstract Type Type { get; }
|
||||
}
|
||||
public class ScriptableImplements<T> : ScriptableImplements
|
||||
{
|
||||
[SerializeReference,SubclassSelector] private T[] implements;
|
||||
public override Type[] Types => Array.ConvertAll(implements, x => x.GetType());
|
||||
public override Type Type => typeof(T);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user