コード例 #1
0
 static public void WriteInstance(NetworkWriter writer, SyncListFloat items)
 {
     writer.Write((ushort)items.Count);
     for (int i = 0; i < items.Count; i++)
     {
         writer.Write(items[i]);
     }
 }
コード例 #2
0
        static public void ReadReference(NetworkReader reader, SyncListFloat syncList)
        {
            ushort count = reader.ReadUInt16();

            syncList.Clear();
            for (ushort i = 0; i < count; i++)
            {
                syncList.AddInternal(reader.ReadSingle());
            }
        }
コード例 #3
0
        static public SyncListFloat ReadInstance(NetworkReader reader)
        {
            ushort count  = reader.ReadUInt16();
            var    result = new SyncListFloat();

            for (ushort i = 0; i < count; i++)
            {
                result.AddInternal(reader.ReadSingle());
            }
            return(result);
        }