public void Initialize(Proxy proxy) { proxy.HookPacket <HelloPacket>((client, packet) => this.m_map = new JsonMap()); proxy.HookPacket <MapInfoPacket>((client, packet) => this.m_map.Init(packet.Width, packet.Height, packet.Name)); proxy.HookPacket <UpdatePacket>(OnUpdatePacket); proxy.HookCommand("saveMap", OnSaveMapCommand); proxy.HookCommand("mapRipper", OnMapRipperCommand); //new Thread(() => new HandleForm(this).ShowDialog()).Start(); }
private bool OnHelloPacket(ref HelloPacket packet) { this.map = new JsonMap(Singleton <XmlData> .Instance); return(true); }