Ejemplo n.º 1
0
        /// <summary>
        /// 服务器时间
        /// </summary>
        private void OnServerTime(PacketBase packet)
        {
            c2ws.ServerTime msg = packet as c2ws.ServerTime;

            //告诉客户端当前服务器时间
            ws2c.ServerTime rep_msg = PacketPools.Get(ws2c.msg.SERVER_TIME) as ws2c.ServerTime;
            rep_msg.server_time = GameTimeManager.Instance.server_time;
            ServerNetManager.Instance.SendProxy(msg.client_uid, rep_msg);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 请求服务器时间
 /// </summary>
 public static void SendServerTime()
 {
     c2ws.ServerTime msg = PacketPools.Get(c2ws.msg.SERVER_TIME) as c2ws.ServerTime;
     ClientNetManager.Instance.Send(msg);
 }