Added early update event.
This commit is contained in:
1 parent
8dcb16073c
commit
5991e60e7a
3 files changed
+23
-1
No files matched your search
@@ -12,9 +12,14 @@ namespace Utils
|
||||
|
||||
public delegate void LateUpdateAction();
|
||||
public static event LateUpdateAction LateUpdated;
|
||||
|
||||
public delegate void EarlyUpdateAction();
|
||||
public static event EarlyUpdateAction EarlyUpdated;
|
||||
|
||||
|
||||
private void Update()
|
||||
{
|
||||
EarlyUpdated?.Invoke();
|
||||
Updated?.Invoke();
|
||||
}
|
||||
|
||||
@@ -54,5 +59,14 @@ namespace Utils
|
||||
return list?.Length ?? 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static int EarlyUpdateLength
|
||||
{
|
||||
get
|
||||
{
|
||||
var list = EarlyUpdated?.GetInvocationList();
|
||||
return list?.Length ?? 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user