public void Update() { UpdateAddDisposer(); UpdateRemoveDisposer(); HashSet <Disposer> list; if (!this.disposers.TryGetValue(EntityEventType.Update, out list)) { return; } foreach (Disposer disposer in list) { try { if (this.removeDisposers.Contains(disposer)) { continue; } EntityTypeInfo entityTypeInfo = this.eventInfo[disposer.GetType()]; entityTypeInfo.Get(EntityEventType.Update).Run(disposer); } catch (Exception e) { Log.Error(e.ToString()); } } }
private void Load() { HashSet <Disposer> list; if (!this.disposers.TryGetValue(EntityEventType.Load, out list)) { return; } foreach (Disposer disposer in list) { EntityTypeInfo entityTypeInfo = this.eventInfo[disposer.GetType()]; entityTypeInfo.Get(EntityEventType.Load).Run(disposer); } }
public void LateUpdate() { HashSet <Disposer> list; if (!this.disposers.TryGetValue(EntityEventType.LateUpdate, out list)) { return; } foreach (Disposer disposer in list) { try { EntityTypeInfo entityTypeInfo = this.eventInfo[disposer.GetType()]; entityTypeInfo.Get(EntityEventType.LateUpdate).Run(disposer); } catch (Exception e) { Log.Error(e.ToString()); } } }
public void Awake(Disposer disposer, object p1, object p2, object p3) { EntityTypeInfo entityTypeInfo = this.eventInfo[disposer.GetType()]; entityTypeInfo.Get(EntityEventType.Awake3)?.Run(disposer, p1, p2, p3); }
public void Awake(Disposer disposer) { EntityTypeInfo entityTypeInfo = this.eventInfo[disposer.GetType()]; entityTypeInfo.Get(EntityEventType.Awake)?.Run(disposer); }