void OnNetworkConnect(bool success, string message){
TNManager.JoinChannel(1, "Adventuring");
}
void OnNetworkJoinChannel(bool success, string message){
print ("Channel joined "+success);
}
void StartServer(){
// Start this thing. Not sure why
IO_MessageBox.instance.SetMessage("Start server", "Starting server isactive "+TNServerInstance.isActive+" lobby "+lobby.remotePort);
// Tools.ResolveIPs(null);
if(!TNServerInstance.isActive){
TNServerInstance.Start(serverTcpPort, Random.Range(10000, 40000), lobby.remotePort, "server.dat", TNServerInstance.Type.Udp);
}
}
void JoinGame(){
List<ServerList.Entry> list = TNLobbyClient.knownServers.list;
IO_MessageBox.instance.SetMessage("server list", "found this many servers "+list.Count);
if(list.Count > 0){
ServerList.Entry ent = list[0];
IO_MessageBox.instance.SetMessage("Let's Go!", "Joining game ");
TNManager.Connect(ent.internalAddress, ent.internalAddress);
}
}