r2mods/ilspy_dump/ror2_csproj/RoR2/ElementalRingController.cs

32 lines
633 B
C#
Raw Normal View History

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