r2mods/ilspy_dump/ror2_csproj/RoR2/TeslaCoilAnimator.cs

28 lines
510 B
C#

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));
}
}
}