WWActorEdit.ByteColor.GetBytes C# (CSharp) Method

GetBytes() public method

public GetBytes ( ) : byte[]
return byte[]
        public byte[] GetBytes()
        {
            byte[] bytes = new byte[3];
            bytes[0] = R;
            bytes[1] = G;
            bytes[2] = B;

            return bytes;
        }

Usage Example

Beispiel #1
0
        public void WriteData(BinaryWriter stream)
        {
            //Fixed values that doesn't seem to change.
            FSHelpers.WriteArray(stream, FSHelpers.ToBytes(0x80000000, 4));
            FSHelpers.WriteArray(stream, FSHelpers.ToBytes(0x80000000, 4));
            FSHelpers.WriteArray(stream, FSHelpers.ToBytes(0x80000000, 4));
            FSHelpers.WriteArray(stream, FSHelpers.ToBytes(0x80000000, 4));

            FSHelpers.WriteArray(stream, HorizonCloudColor.GetBytes());
            FSHelpers.WriteArray(stream, CenterCloudColor.GetBytes());
            FSHelpers.WriteArray(stream, CenterSkyColor.GetBytes());
            FSHelpers.WriteArray(stream, HorizonColor.GetBytes());
            FSHelpers.WriteArray(stream, SkyFadeTo.GetBytes());

            FSHelpers.WriteArray(stream, FSHelpers.ToBytes(0xFFFFFF, 3)); //3 Bytes Padding
        }
All Usage Examples Of WWActorEdit.ByteColor::GetBytes