forked from zxl/LaboratoryProtection
22 lines
499 B
C#
22 lines
499 B
C#
|
using System;
|
|||
|
using Sirenix.OdinInspector;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
namespace UnityTest.ZXL
|
|||
|
{
|
|||
|
public class EffectComponent : MonoBehaviour
|
|||
|
{
|
|||
|
public EffectType effectType => effectData.effectType;
|
|||
|
public EffectData effectData;
|
|||
|
|
|||
|
#if UNITY_EDITOR
|
|||
|
[Button]
|
|||
|
void Add()
|
|||
|
{
|
|||
|
effectData = new EffectData();
|
|||
|
effectData.effectType = Enum.Parse<EffectType>(this.name);
|
|||
|
effectData.effect = this.gameObject;
|
|||
|
}
|
|||
|
#endif
|
|||
|
}
|
|||
|
}
|