BITKit/Packages/Runtime~/Unity/Scripts/VFXManager/VFX.cs

16 lines
482 B
C#
Raw Normal View History

2023-06-05 19:57:17 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
namespace BITKit
{
2023-06-29 14:57:11 +08:00
public class VFX : ScriptableObject, IObjectElement<string, Transform>
2023-06-05 19:57:17 +08:00
{
public string[] tags;
public Transform[] prefabs;
public AudioClip[] clips;
public Transform GetValue() => prefabs.Random();
public Transform prefab=>prefabs.Random();
public bool IsMatch(string[] key)=>MathE.Contains(key,tags);
}
}