static void Update(float deltaTime) { useTime = useTime - deltaTime; if (useTime <= 0) { Console.WriteLine(string.Format("已存发包数:{0}; 已存收包数:{1}", Client.SentCount, Client.LostCount)); useTime = DELAYTIME; } Client.Update(deltaTime); }
//const string CONTENT = static void Update(float deltaTime) { useTime = useTime - deltaTime; if (useTime <= 0) { Client.Send(new UDPPacket() { Content = "当年忠贞为国酬,何曾怕断头?如今天下红遍,江山靠谁守?业未就,身躯倦,鬓已秋。你我之辈,忍将夙愿,付与东流?" }); useTime = DELAYTIME; Console.WriteLine(string.Format("已存发包数:{0}; 已存收包数:{1}", Client.SentCount, Client.LostCount)); } Client.Update(deltaTime); }