static void Main(string[] args) { Server = new Server { Ports = { new ServerPort("localhost", Port, ServerCredentials.Insecure) } }; Server.Services.Add(SimpleChat.BindService((SimpleChat.SimpleChatBase)Activator.CreateInstance(typeof(SimpleChatService)))); Server.Services.Add(SimpleBot.BindService((SimpleBot.SimpleBotBase)Activator.CreateInstance(typeof(SimpleBotService)))); Server.Start(); Console.WriteLine($"Server start localhost:{Port}"); Console.ReadLine(); }
void Start() { string[] names = new string[] { "me", "myself", "you", "nobody", "somebody", "hotdog", "cupcake", "Mr.Roboto", "Phil", "Sour Sally" }; sc = new SimpleChat("default", gameObject.GetComponent <MonoBehaviour>(), names[Random.Range(0, names.Length)]); }
void Start() { string[] names = new string[]{"me","myself","you","nobody","somebody","hotdog","cupcake","Mr.Roboto","Phil","Sour Sally"}; sc = new SimpleChat("default",gameObject.GetComponent<MonoBehaviour>(),names[Random.Range(0,names.Length)]); }
private static void Main(string[] args) { SimpleChat.Launch().Wait(); }
SimpleChat sChat; // Access to the chat script void Start() { DontDestroyOnLoad(this); sChat = GetComponent<SimpleChat>(); connectionIP = Network.player.ipAddress; }