public static void Update(float ElapsedSeconds)
 {
     for (int i = 0; i < listUpdate.Count; i++)
     {
         IUpdate single = listUpdate[i];
         if (single != null)
         {
             UnityEngine.Profiling.Profiler.BeginSample(single.GetType() + "update");
             //long time = TimeManager.GetLocalTime();
             single.On_Update(ElapsedSeconds);
             //long time2 = TimeManager.GetLocalTime();
             //if (time2 - time > 3)
             //{
             //    UnityEngine.Debug.LogErrorFormat("{0} {1}", single.GetType().ToString(), time2 - time);
             //}
             UnityEngine.Profiling.Profiler.EndSample();
         }
     }
 }
Ejemplo n.º 2
0
 public void Register(IUpdate updater)
 {
     Context.Debug(() => $"Registering {updater.GetType().Name}.");
     Updater = updater;
 }