示例#1
0
 public Engine(IUpdateReceiver reciever, IUpdateBroadcaster broadcaster, IReceiverQueue <IGameUpdate> queue,
               IServerGameState serverGameState, IServerStateManager serverStateManager, ICommandDecoder decoder, ICommandEncoder encoder)
 {
     _reciever           = reciever;
     _broadcaster        = broadcaster;
     _queue              = queue;
     _serverGameState    = serverGameState;
     _serverStateManager = serverStateManager;
     _decoder            = decoder;
     _encoder            = encoder;
 }
示例#2
0
        public ClientEngine(IUpdateGatherer updateGatherer, IUpdateSender updateSender, ICommandEncoder commandEncoder,
                            ICommandDecoder commandDecoder, IReceiverQueue <string> queue)
        {
            _updateGatherer = updateGatherer;
            _updateSender   = updateSender;
            _commandEncoder = commandEncoder;
            _commandDecoder = commandDecoder;
            _queue          = queue;

            _gathererThread  = CreateUpdateGathererThread();
            _processorThread = CreateProcessorThread();
        }
示例#3
0
 public UpdateGatherer(IReceiverQueue <string> queue)
 {
     _queue          = queue;
     _serverEndpoint = new IPEndPoint(IPAddress.Any, 0); // TODO change port / ip to a global config
 }
示例#4
0
 public QueueTests()
 {
     _queue = new ReceiverQueue <IGameUpdate>();
 }
示例#5
0
 public UpdateReceiver(IReceiverQueue <IGameUpdate> queue)
 {
     _queue = queue;
 }