Utils/Runtime/PhysicsEventManager.cs

21 lines
497 B
C#

using System;
using UnityEngine;
namespace Utils
{
public class PhysicsEventManager : MonoBehaviour
{
public delegate void FixedUpdateAction();
public static event FixedUpdateAction FixedUpdated;
private void FixedUpdate()
{
FixedUpdated?.Invoke();
}
public static Delegate[] FixedUpdateDelegates => FixedUpdated?.GetInvocationList();
public static int FixedUpdateLength => FixedUpdateDelegates?.Length ?? 0;
}
}