Add support for XML files.

XML support is now implemented and should generally be working!
This library should be useable now, but I still need to set it up to
work as a NuGet package.
If there are any bugs, let me know!
This commit is contained in:
CloneTrooper1019
2019-01-30 00:36:56 -06:00
parent 5319ae72f9
commit 50561460ac
44 changed files with 1292 additions and 99 deletions

View File

@ -6,8 +6,8 @@ namespace Roblox.DataTypes
[Flags]
public enum Axes
{
X = 0 << Axis.X,
Y = 0 << Axis.Y,
Z = 0 << Axis.Z,
X = 1 << Axis.X,
Y = 1 << Axis.Y,
Z = 1 << Axis.Z,
}
}

View File

@ -26,11 +26,11 @@ namespace Roblox.DataTypes
private const string DefaultName = "Medium stone grey";
private const int DefaultNumber = 194;
internal BrickColor(int number, int rgb, string name)
internal BrickColor(int number, uint rgb, string name)
{
int r = (rgb / 65536) % 256;
int g = (rgb / 256) % 256;
int b = rgb % 256;
uint r = (rgb / 65536) % 256;
uint g = (rgb / 256) % 256;
uint b = (rgb % 256);
Name = name;
Number = number;

View File

@ -18,7 +18,7 @@ namespace Roblox.DataTypes
return string.Join(", ", R, G, B);
}
public static Color3 fromRGB(int r = 0, int g = 0, int b = 0)
public static Color3 fromRGB(uint r = 0, uint g = 0, uint b = 0)
{
return new Color3(r / 255f, g / 255f, b / 255f);
}

View File

@ -3,17 +3,17 @@
public struct ColorSequenceKeypoint
{
public readonly float Time;
public readonly Color3 Color;
public readonly Color3 Value;
public ColorSequenceKeypoint(float time, Color3 color)
public ColorSequenceKeypoint(float time, Color3 value)
{
Time = time;
Color = color;
Value = value;
}
public override string ToString()
{
return string.Join(" ", Time, Color.R, Color.G, Color.B, 0);
return string.Join(" ", Time, Value.R, Value.G, Value.B, 0);
}
}
}

View File

@ -6,11 +6,11 @@ namespace Roblox.DataTypes
[Flags]
public enum Faces
{
Right = 0 << NormalId.Right,
Top = 0 << NormalId.Top,
Back = 0 << NormalId.Back,
Left = 0 << NormalId.Left,
Bottom = 0 << NormalId.Bottom,
Front = 0 << NormalId.Front,
Right = 1 << NormalId.Right,
Top = 1 << NormalId.Top,
Back = 1 << NormalId.Back,
Left = 1 << NormalId.Left,
Bottom = 1 << NormalId.Bottom,
Front = 1 << NormalId.Front,
}
}

View File

@ -28,7 +28,7 @@
public override string ToString()
{
return '{' + Origin + "}, {" + Direction + '}';
return '{' + Origin.ToString() + "}, {" + Direction.ToString() + '}';
}
public Vector3 ClosestPoint(Vector3 point)