Added read support for Instance Attributes.

This isn't 100% finished yet. I intend to add some better API for reading specific attributes, as well as write support (of course!)
This commit is contained in:
CloneTrooper1019
2019-10-31 21:40:31 -05:00
parent fd8598c1b5
commit e14b092aa7
30 changed files with 580 additions and 95 deletions

View File

@ -3,6 +3,7 @@
public class UDim2
{
public readonly UDim X, Y;
public override string ToString() => $"{{{X}}},{{{Y}}}";
public UDim Width => X;
public UDim Height => Y;
@ -19,11 +20,12 @@
Y = y;
}
public override string ToString()
internal UDim2(Attribute attr)
{
return '{' + X.ToString() + "},{" + Y.ToString() + '}';
X = new UDim(attr);
Y = new UDim(attr);
}
public UDim2 Lerp(UDim2 other, float alpha)
{
float scaleX = X.Scale + ((other.X.Scale - X.Scale) * alpha);