Ejemplo n.º 1
0
        public CommandsSender(EngineService engineService, NetworkService networkService, ComponentAndEventRegistrator componentAndEventRegistrator, SharedEntityRegistry entityRegistry)
        {
            this.networkService   = networkService;
            this.entityRegistry   = entityRegistry;
            this.commandCollector = new CommandCollector();
            this.logger           = LoggerProvider.GetLogger(this);
            EventCommandCollector     eventListener     = new EventCommandCollector(this.commandCollector, componentAndEventRegistrator, entityRegistry);
            ComponentCommandCollector componentListener = new ComponentCommandCollector(this.commandCollector, componentAndEventRegistrator, entityRegistry);

            engineService.AddFlowListener(this);
            engineService.AddComponentListener(componentListener);
            engineService.AddEventListener(eventListener);
        }