コード例 #1
0
ファイル: Client.cs プロジェクト: DanielEverland/Dead-Air
        public static void UpdateServerPerformance(ServerPerformance performance)
        {
            if (performance == null)
            {
                return;
            }

            Instance._serverPerformance = performance;
        }
コード例 #2
0
        private static void Send()
        {
            foreach (Peer peer in Network.Peers)
            {
                ServerPerformance performance = new ServerPerformance(
                    PerformanceCapture.FrameRate,
                    (float)peer.Statistics.PacketLossPercent / 100);

                peer.SendReliableUnordered(new NetworkPackage(PackageIdentification.ServerPerformance, performance));
            }
        }