Move events to App class.

This commit is contained in:
2025-08-17 06:43:30 +02:00
parent dbac051fc2
commit 5f0b8a2a11
13 changed files with 65 additions and 62 deletions

View File

@@ -1,26 +1,17 @@
using System;
using UnityEngine;
namespace Utils
{
public class PhysicsEventManager : MonoBehaviour
{
public delegate void FixedUpdateAction();
public static event FixedUpdateAction FixedUpdated;
private void FixedUpdate()
{
FixedUpdated?.Invoke();
App.InvokeFixedUpdate();
}
private void OnApplicationQuit()
{
FixedUpdated = null;
App.ClearFixedUpdate();
}
public static Delegate[] FixedUpdateDelegates => FixedUpdated?.GetInvocationList();
public static int FixedUpdateLength => FixedUpdateDelegates?.Length ?? 0;
}
}