示例#1
0
 public void SendIdListToClient(NetworkConnection conn)
 {
     foreach (NetworkHash128 typeId in typeIdList)
     {
         MessageIdObject msg = new MessageIdObject();
         msg.TypeId = typeId;
         msg.info   = "typeId";
         serverManager.SendMsgToClient(conn.connectionId, msg);
         Debug.Log("sent " + typeId.ToString() + " typeId");
     }
 }
    /*public MessageBase ListId(List<NetworkHash128> typeIdList) {
     *  MessageListIdObject msg = new MessageListIdObject();
     *  msg.Command = typeIdList;
     *  msg.info = "typeId";
     *  return msg;
     * }*/

    public List <MessageBase> ListId(List <NetworkHash128> typeIdList)
    {
        List <MessageBase> listMsg = new List <MessageBase>();

        foreach (NetworkHash128 typeId in typeIdList)
        {
            MessageIdObject msg = new MessageIdObject()
            {
                TypeId = typeId,
                info   = "typeId"
            };
            listMsg.Add(msg);
        }
        return(listMsg);
    }