コード例 #1
0
ファイル: RPCTests.cs プロジェクト: traleven/PNet
        public void MyTestInitialize()
        {
            _client = new TestablePNet();
            _client.TestableHook.StartUpdateThread();

            _client.OnRoomChange += s => _client.FinishedRoomChange();
            PNetServer.OnPlayerConnected += player => player.ChangeRoom(_testRoom);

            _testRoom = Room.CreateRoom("test room");

            _client.Connect(TestablePNet.GetTestConnectionConfig());
            Thread.Sleep(250);
            _player = PNetServer.AllPlayers().First(f => f != null && f != Player.Server);
        }