r2mods/ilspy_dump/ror2_csproj/RoR2/TeslaCoilAnimator.cs

28 lines
510 B
C#
Raw Permalink Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine;
namespace RoR2;
public class TeslaCoilAnimator : MonoBehaviour
{
public GameObject activeEffectParent;
private CharacterBody characterBody;
private void Start()
{
CharacterModel componentInParent = GetComponentInParent<CharacterModel>();
if ((bool)componentInParent)
{
characterBody = componentInParent.body;
}
}
private void FixedUpdate()
{
if ((bool)characterBody)
{
activeEffectParent.SetActive(characterBody.HasBuff(RoR2Content.Buffs.TeslaField));
}
}
}