Files
Cielonos/Assets/Scripts/MainGame/Base/FunctionalAnimation/Payloads/SpawnVFX.cs

23 lines
574 B
C#
Raw Normal View History

2025-12-23 19:47:06 -05:00
using System;
2025-12-17 04:19:38 -05:00
using SLSUtilities.FunctionalAnimation;
using UnityEngine;
namespace Cielonos.MainGame.FunctionalAnimation
{
2025-12-23 19:47:06 -05:00
[Serializable]
2025-12-17 04:19:38 -05:00
public class SpawnVFX : FuncAnimPayloadBase
{
public string vfxKey = "VFXKey";
public override void Invoke()
{
2026-04-18 13:57:19 -04:00
if (mute) return;
2026-05-23 08:27:50 -04:00
VFXObject vfxObject = character.vfxData.SpawnVFX(vfxKey, character).GetComponent<VFXObject>();
2025-12-17 04:19:38 -05:00
if (vfxObject != null)
{
2026-01-17 11:35:49 -05:00
vfxObject.SetCreator(character);
2025-12-17 04:19:38 -05:00
}
}
}
}