Files
Cielonos/Assets/OtherPlugins/HUD-Navigation-System/_Examples/Scripts/ExampleCallbackScript.cs
2026-04-18 13:57:19 -04:00

47 lines
1.3 KiB
C#

using SickscoreGames.HUDNavigationSystem;
using UnityEngine;
public class ExampleCallbackScript : MonoBehaviour
{
#region Example Methods
public void ChangeIndicatorColors (HUDNavigationElement element)
{
// EXAMPLE:
// => Change the indicator colors of the element
if (element.Indicator != null) {
// onscreen icon color
if (element.Indicator.OnscreenIcon != null)
element.Indicator.OnscreenIcon.color = Color.magenta;
// offscreen icon color
if (element.Indicator.OffscreenIcon != null)
element.Indicator.OffscreenIcon.color = Color.magenta;
}
}
public void OnElementAppeared (HUDNavigationElement element, NavigationElementType type)
{
Debug.LogFormat ("{0} element of {1} appeared.", type, element.name);
}
public void OnElementDisappeared (HUDNavigationElement element, NavigationElementType type)
{
Debug.LogFormat ("{0} element of {1} disappeared.", type, element.name);
}
public void OnElementEnterRadius (HUDNavigationElement element, NavigationElementType type)
{
Debug.LogFormat ("{0} element of {1} entered radius.", type, element.name);
}
public void OnElementLeaveRadius (HUDNavigationElement element, NavigationElementType type)
{
Debug.LogFormat ("{0} element of {1} left radius.", type, element.name);
}
#endregion
}