示例#1
0
        public static void AssemblyInit(TestContext context)
        {
            Steamworks.Dispatch.OnDebugCallback = (type, str, server) =>
            {
                Console.WriteLine($"[Callback {type} {(server ? "server" : "client")}]");
                Console.WriteLine(str);
                Console.WriteLine($"");
            };

            Steamworks.Dispatch.OnException = (e) =>
            {
                Console.Error.WriteLine(e.Message);
                Console.Error.WriteLine(e.StackTrace);
                Assert.Fail(e.Message);
            };

            //
            // Init Client
            //
            Steamworks.SteamClient.Init(252490);

            //
            // Init Server
            //
            var serverInit = new SteamServerInit("rust", "Rusty Mode")
            {
                GamePort  = 28015,
                Secure    = true,
                QueryPort = 28016
            };

            Steamworks.SteamServer.Init(252490, serverInit);

            SteamServer.LogOnAnonymous();
        }
示例#2
0
        public static void AssemblyInit(TestContext context)
        {
            Steamworks.SteamClient.OnCallbackException = (e) =>
            {
                Console.Error.WriteLine(e.Message);
                Console.Error.WriteLine(e.StackTrace);
                Assert.Fail(e.Message);
            };

            //
            // Init Client
            //
            Steamworks.SteamClient.Init(252490);

            //
            // Init Server
            //
            var serverInit = new SteamServerInit("rust", "Rusty Mode")
            {
                GamePort  = 28015,
                Secure    = true,
                QueryPort = 28016
            };

            Steamworks.SteamServer.Init(252490, serverInit);

            SteamServer.LogOnAnonymous();
        }
示例#3
0
        public static void AssemblyInit(TestContext context)
        {
            //
            // Init Client
            //
            Steamworks.SteamClient.Init(252490);

            //
            // Init Server
            //
            var serverInit = new SteamServerInit("rust", "Rusty Mode")
            {
                GamePort  = 28015,
                Secure    = true,
                QueryPort = 28016
            };

            Steamworks.SteamServer.Init(252490, serverInit);

            SteamServer.LogOnAnonymous();
        }