public virtual void Register(Coroutine coro) { coro.AddEntry(OnTick); foreach (var controller in _controllerMap.Values) { coro.AddEntry(controller.OnTick); } }
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); }
public void AddEntry(Coroutine.LogicEntryDelegate entry) { _coroutine.AddEntry(entry); }
private void FormGame_Load(object sender, EventArgs e) { Task.Factory.StartNew(PacketPump); _coro.AddEntry(ClearChatMessage); }