NewSF64Toolkit.DataStructures.DataObjects.SFLevelObject.LoadFromBytes C# (CSharp) Method

LoadFromBytes() public method

public LoadFromBytes ( byte bytes ) : bool
bytes byte
return bool
        public bool LoadFromBytes(byte[] bytes)
        {
            if (bytes.Length != Size)
                return false;

            LvlPos = ByteHelper.ReadFloat(bytes, 0);
            Z = ByteHelper.ReadShort(bytes, 0x4);
            X = ByteHelper.ReadShort(bytes, 0x6);
            Y = ByteHelper.ReadShort(bytes, 0x8);
            XRot = ByteHelper.ReadShort(bytes, 0xA);
            YRot = ByteHelper.ReadShort(bytes, 0xC);
            ZRot = ByteHelper.ReadShort(bytes, 0xE);
            ID = ByteHelper.ReadUShort(bytes, 0x10);
            Unk = ByteHelper.ReadUShort(bytes, 0x12);

            return true;
        }