コード例 #1
0
        public static Tuple <byte, byte> ReadTupleByteByte(this AssetStream stream)
        {
            byte value1 = stream.ReadByte();
            byte value2 = stream.ReadByte();

            return(new Tuple <byte, byte>(value1, value2));
        }
コード例 #2
0
        public static Tuple <char, char> ReadTupleCharChar(this AssetStream stream)
        {
            char value1 = Convert.ToChar(stream.ReadByte());
            char value2 = Convert.ToChar(stream.ReadByte());

            return(new Tuple <char, char>(value1, value2));
        }
コード例 #3
0
        public static Tuple <byte, float> ReadTupleByteSingle(this AssetStream stream)
        {
            byte  value1 = stream.ReadByte();
            float value2 = stream.ReadSingle();

            return(new Tuple <byte, float>(value1, value2));
        }
コード例 #4
0
        public static Tuple <char, float> ReadTupleCharSingle(this AssetStream stream)
        {
            char  value1 = Convert.ToChar(stream.ReadByte());
            float value2 = stream.ReadSingle();

            return(new Tuple <char, float>(value1, value2));
        }
コード例 #5
0
        public static void Read(this IDictionary <string, byte> _this, AssetStream stream)
        {
            int count = stream.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                string key   = stream.ReadStringAligned();
                byte   value = stream.ReadByte();
                _this.Add(key, value);
            }
        }