public void LobbyConnect() { using Lobby lobby = new Lobby(); using RpcClientWithType <EmptyPlayerExecutor, ILobbyToPlayer, IPlayerToLobby> player1 = new RpcClientWithType <EmptyPlayerExecutor, ILobbyToPlayer, IPlayerToLobby>(), player2 = new RpcClientWithType <EmptyPlayerExecutor, ILobbyToPlayer, IPlayerToLobby>(); lobby.Start(10001, 10002); player1.StartAsync(LocalHost, 10001).Wait(); player2.StartAsync(LocalHost, 10001).Wait(); }
public static void Start() { Log.WriteLine("Starting RiceServer."); Auth.Start(); Lobby.Start(); Game.Start(); Area.Start(); Ranking.Start(); Log.WriteLine("RiceServer started."); }
public void LobbyRun() { using Lobby lobby = new Lobby(); using RpcClientWithType <PlayerExecutor, ILobbyToPlayer, IPlayerToLobby> player1 = new RpcClientWithType <PlayerExecutor, ILobbyToPlayer, IPlayerToLobby>(), player2 = new RpcClientWithType <PlayerExecutor, ILobbyToPlayer, IPlayerToLobby>(); using var evt = new ManualResetEvent(false); this.evt = evt; lobby.Start(10001, 10002); player1.StartAsync(LocalHost, 10001).Wait(); evt.WaitOne(); evt.Reset(); player2.StartAsync(LocalHost, 10001).Wait(); evt.WaitOne(); evt.Reset(); }
static void Main(string[] args) { var lobby = new Lobby(); lobby.Start(); }