mirror of
https://git.shazbot.fr/shazbot/Utils.git
synced 2026-01-12 05:00:58 +01:00
37 lines
774 B
C#
37 lines
774 B
C#
using UnityEngine;
|
|
|
|
namespace Utils
|
|
{
|
|
public class EventManager : MonoBehaviour
|
|
{
|
|
private void Awake()
|
|
{
|
|
Application.quitting += OnQuitting;
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
Application.quitting -= OnQuitting;
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
App.InvokeEarlyUpdate();
|
|
App.InvokeUpdate();
|
|
}
|
|
|
|
private void LateUpdate()
|
|
{
|
|
App.InvokeLateUpdate();
|
|
App.InvokeLastUpdate();
|
|
}
|
|
|
|
private void OnQuitting()
|
|
{
|
|
App.ClearUpdate();
|
|
App.ClearLateUpdate();
|
|
App.ClearEarlyUpdate();
|
|
App.ClearLastUpdate();
|
|
}
|
|
}
|
|
} |