BBGamelib.flash.imp.Utils.ReadByte C# (CSharp) Method

ReadByte() public static method

public static ReadByte ( byte data, Cursor cursor ) : byte
data byte
cursor Cursor
return byte
		public static byte ReadByte(byte[] data, Cursor cursor)
		{
			byte aByte = data [cursor.index];
			cursor.index ++;
			return aByte;
		}
		public static int ReadInt32(byte[] data, Cursor cursor)

Usage Example

Beispiel #1
0
        public TagDefineMovie(Flash flash, byte[] data, Cursor cursor) : base(flash, data, cursor)
        {
            int tagsCount = Utils.ReadInt32(data, cursor);

            _tags = new ITag[tagsCount];
            for (int i = 0; i < tagsCount; i++)
            {
                byte type = Utils.ReadByte(data, cursor);
                if (type == TagPlaceObject.TYPE)
                {
                    ITag tag = new TagPlaceObject(this.flash, data, cursor);
                    _tags[i] = tag;
                }
                else if (type == TagRemoveObject.TYPE)
                {
                    ITag tag = new TagRemoveObject(this.flash, data, cursor);
                    _tags[i] = tag;
                }
            }

            _maxDepth = Utils.ReadInt32(data, cursor);

            int framesCount = Utils.ReadInt32(data, cursor);

            _frames = new Frame[framesCount];
            for (int i = 0; i < framesCount; i++)
            {
                Frame frame = new Frame(i, data, cursor);
                _frames[i] = frame;
            }
        }
All Usage Examples Of BBGamelib.flash.imp.Utils::ReadByte