public StartHourlyBonusStateSystem(Contexts contexts) : base(contexts.events) { _coreContext = contexts.core; _uiListenersContext = contexts.uIListeners; _uiListenersContext.GetGroup(UIListenersMatcher.SetHourlyBonusStateListener).OnEntityAdded += (group, entity, index, component) => _state = entity.setHourlyBonusStateListener.state; }
public Contexts() { core = new CoreContext(); events = new EventsContext(); uIListeners = new UIListenersContext(); var postConstructors = System.Linq.Enumerable.Where( GetType().GetMethods(), method => System.Attribute.IsDefined(method, typeof(Entitas.CodeGeneration.Attributes.PostConstructorAttribute)) ); foreach (var postConstructor in postConstructors) { postConstructor.Invoke(this, null); } }