public void OnDisable <P1, P2, P3, P4>(Entity component, P1 p1, P2 p2, P3 p3, P4 p4) { List <object> iOnDisableSystems = this.typeSystems.GetSystems(component.GetType(), typeof(IOnDisableSystem <P1, P2, P3, P4>)); if (iOnDisableSystems == null) { return; } for (int i = 0; i < iOnDisableSystems.Count; i++) { IOnDisableSystem <P1, P2, P3, P4> aOnDisableSystem = (IOnDisableSystem <P1, P2, P3, P4>)iOnDisableSystems[i]; if (aOnDisableSystem == null) { continue; } try { aOnDisableSystem.Run(component, p1, p2, p3, p4); } catch (Exception e) { Log.Error(e); } } }
public void OnDisable(Entity component) { List <object> iOnDisableSystems = this.typeSystems.GetSystems(component.GetType(), typeof(IOnDisableSystem)); if (iOnDisableSystems == null) { return; } for (int i = 0; i < iOnDisableSystems.Count; i++) { IOnDisableSystem aOnDisableSystem = (IOnDisableSystem)iOnDisableSystems[i]; if (aOnDisableSystem == null) { continue; } try { aOnDisableSystem.Run(component); } catch (Exception e) { Log.Error(e); } } }