r2mods/ilspy_dump/ror2_csproj/RoR2.UI/HudObjectiveTargetSetter.cs

24 lines
398 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine;
namespace RoR2.UI;
public class HudObjectiveTargetSetter : MonoBehaviour
{
public ObjectivePanelController objectivePanelController;
private HUD hud;
private void OnEnable()
{
hud = GetComponentInParent<HUD>();
}
private void Update()
{
if ((bool)hud && (bool)objectivePanelController)
{
objectivePanelController.SetCurrentMaster(hud.targetMaster);
}
}
}