using UnityEngine; public class DamageOverTimeVFXManager : MonoBehaviour { public GameObject burnVFX; public GameObject poisonVFX; public GameObject bleedVFX; private void Awake() { SetupEffectInstance(burnVFX); SetupEffectInstance(poisonVFX); SetupEffectInstance(bleedVFX); } private void SetupEffectInstance(GameObject vfx) where T : BaseDamageOverTimeEffectInstance { T instance = GetComponent(); if (instance != null) { instance.OnEffectStackAddedEvent.AddListener(() => vfx.SetActive(true)); instance.OnEffectEnded.AddListener(() => vfx.SetActive(false)); } } }