Example #1
0
 public virtual void Register(Coroutine coro)
 {
     coro.AddEntry(OnTick);
     foreach (var controller in _controllerMap.Values)
     {
         coro.AddEntry(controller.OnTick);
     }
 }
Example #2
0
File: Program.cs Project: ktj007/Lz
        public Program()
        {
            _data = new DataManager();
            _listener = new Listener();
            _coroutine = new Coroutine();
            _context = new ServerContext(_listener, _data, _coroutine);

            _listener.Port = _data.World.Config.port;
            _listener.RegisterHandler(new PacketHandler(_context));

            _coroutine.AddEntry(_context.SaveContextEntry);
        }
Example #3
0
        public Program()
        {
            _data      = new DataManager();
            _listener  = new Listener();
            _coroutine = new Coroutine();
            _context   = new ServerContext(_listener, _data, _coroutine);

            _listener.Port = _data.World.Config.port;
            _listener.RegisterHandler(new PacketHandler(_context));

            _coroutine.AddEntry(_context.SaveContextEntry);
        }
Example #4
0
 public void AddEntry(Coroutine.LogicEntryDelegate entry)
 {
     _coroutine.AddEntry(entry);
 }
Example #5
0
File: FormGame.cs Project: lacti/Lz
        private void FormGame_Load(object sender, EventArgs e)
        {
            Task.Factory.StartNew(PacketPump);

            _coro.AddEntry(ClearChatMessage);
        }