Esempio n. 1
0
        public static void Read <T1, T2>(this Dictionary <Tuple <T1, long>, T2> _this, AssetReader reader)
            where T1 : IAssetReadable, new()
            where T2 : IAssetReadable, new()
        {
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                Tuple <T1, long> key = reader.ReadTupleTLong <T1>();
                T2 value             = new T2();
                value.Read(reader);
                _this.Add(key, value);
            }
        }
Esempio n. 2
0
        public static void Read(this IDictionary <Tuple <ushort, ushort>, float> _this, AssetReader reader)
        {
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                Tuple <ushort, ushort> key = reader.ReadTupleUInt16UInt16();
                float value = reader.ReadSingle();
                _this.Add(key, value);
            }
        }