public virtual void OnEnable() { if (state.enabled || state.requireStarter || state.requireActorParent) { return; } state.released = false; state.enabled = true; if (ProcessingSignals.TryAddToGlobal(this)) { if (signals == null) { signals = new ProcessingSignals(); } signals.Add(this); } ProcessingUpdate.Default.Add(this); HandleEnable(); }
protected ProcessingBase() { ProcessingSystemAttributes.Setup(this); ProcessingGroupAttributes.Setup(this); ProcessingSignals.TryAddToGlobal(this); }
public override void OnEnable() { if (state.enabled || state.requireStarter || state.requireActorParent) { return; } if (state.disabled) { ProcessingEntities.Default.CheckGroups(id, true); } HandleEnable(); state.released = false; state.disabled = false; state.enabled = true; if (ProcessingSignals.TryAddToGlobal(this)) { if (signals == null) { signals = new ProcessingSignals(); } signals.Add(this); } var len = compositionNoTags.Count; int i; for (i = 0; i < len; i++) { Behavior.behaviors[compositionNoTags[i]].AddElement(id); } len = compositions != null ? compositions.Count : -1; for (i = 0; i < len; i++) { var composition = compositions[i]; if (composition.changed || !composition.Contain(tags)) { continue; } composition.changed = true; var l = composition.ids.Count; for (var j = 0; j < l; j++) { Behavior.behaviors[composition.ids[j]].AddElement(id); } l = composition.delegates.Count; for (var j = 0; j < l; j++) { composition.delegates[j](true); } } ProcessingUpdate.Default.Add(this); }