Rename EventManager methods.
This commit is contained in:
parent
b48d66bd6a
commit
518debbf1c
@ -5,34 +5,34 @@ namespace Utils
|
|||||||
public class EventManager : MonoBehaviour
|
public class EventManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
public delegate void UpdateAction();
|
public delegate void UpdateAction();
|
||||||
public static event UpdateAction OnUpdated;
|
public static event UpdateAction Updated;
|
||||||
|
|
||||||
public delegate void FixedUpdateAction();
|
public delegate void FixedUpdateAction();
|
||||||
public static event FixedUpdateAction OnFixedUpdated;
|
public static event FixedUpdateAction FixedUpdated;
|
||||||
|
|
||||||
public delegate void LateUpdateAction();
|
public delegate void LateUpdateAction();
|
||||||
public static event LateUpdateAction OnLateUpdated;
|
public static event LateUpdateAction LateUpdated;
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
OnUpdated?.Invoke();
|
Updated?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FixedUpdate()
|
private void FixedUpdate()
|
||||||
{
|
{
|
||||||
OnFixedUpdated?.Invoke();
|
FixedUpdated?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LateUpdate()
|
private void LateUpdate()
|
||||||
{
|
{
|
||||||
OnLateUpdated?.Invoke();
|
LateUpdated?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int UpdateLength
|
public static int UpdateLength
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
var list = OnUpdated?.GetInvocationList();
|
var list = Updated?.GetInvocationList();
|
||||||
return list?.Length ?? 0;
|
return list?.Length ?? 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -41,7 +41,7 @@ namespace Utils
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
var list = OnFixedUpdated?.GetInvocationList();
|
var list = FixedUpdated?.GetInvocationList();
|
||||||
return list?.Length ?? 0;
|
return list?.Length ?? 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -50,7 +50,7 @@ namespace Utils
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
var list = OnLateUpdated?.GetInvocationList();
|
var list = LateUpdated?.GetInvocationList();
|
||||||
return list?.Length ?? 0;
|
return list?.Length ?? 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ru.shazbot.utils",
|
"name": "ru.shazbot.utils",
|
||||||
"version": "3.1.2",
|
"version": "4.0.0",
|
||||||
"displayName": "Utils",
|
"displayName": "Utils",
|
||||||
"description": "Utility useful for almost any project.",
|
"description": "Utility useful for almost any project.",
|
||||||
"licensesUrl": "https://git.shazbot.ru/Utils.git/tree/LICENSE.md",
|
"licensesUrl": "https://git.shazbot.ru/Utils.git/tree/LICENSE.md",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user