36 lines
673 B
C#
36 lines
673 B
C#
using Moonlit.Utils;
|
|
using UnityEngine;
|
|
|
|
namespace Moonlit.FootstepPro
|
|
{
|
|
[AddComponentMenu("FootprintSystem/Dynamic Mask")]
|
|
public class DynamicMask : MonoBehaviour
|
|
{
|
|
private void Awake()
|
|
{
|
|
Singleton<FootprintSystem>.Instance.RegisterMask(this);
|
|
}
|
|
|
|
private void OnEnable()
|
|
{
|
|
Singleton<FootprintSystem>.Instance.RegisterMask(this);
|
|
}
|
|
|
|
private void OnDisable()
|
|
{
|
|
if (Singleton<FootprintSystem>.IsInitialized)
|
|
{
|
|
Singleton<FootprintSystem>.Instance.UnregisterMask(this);
|
|
}
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
if (Singleton<FootprintSystem>.IsInitialized)
|
|
{
|
|
Singleton<FootprintSystem>.Instance.UnregisterMask(this);
|
|
}
|
|
}
|
|
}
|
|
}
|