12345678910111213141516171819202122232425262728293031323334 |
- using System;
- namespace XGame.Framework.ThreadScheduler
- {
- public static class MainThreadUpdateRegister
- {
- private static Action<int> _update;
- public static event Action<int> update
- {
- add
- {
- _update += value;
- }
- remove
- {
- _update -= value;
- }
- }
- public static void Update(int millisecond)
- {
- try
- {
- _update?.Invoke(millisecond);
- }
- catch (Exception ex)
- {
- Log.Exception(ex);
- }
-
- }
- }
- }
|