public NumberRange ReadAttribute(RbxAttribute attr) { float min = attr.ReadFloat(); float max = attr.ReadFloat(); return(new NumberRange(min, max)); }
public static Vector2 ReadVector2(RbxAttribute attr) { float x = attr.ReadFloat(), y = attr.ReadFloat(); return(new Vector2(x, y)); }
public static Vector3 ReadVector3(RbxAttribute attr) { float x = attr.ReadFloat(), y = attr.ReadFloat(), z = attr.ReadFloat(); return(new Vector3(x, y, z)); }
public static Color3 ReadColor3(RbxAttribute attr) { float r = attr.ReadFloat(), g = attr.ReadFloat(), b = attr.ReadFloat(); return(new Color3(r, g, b)); }
public static UDim ReadUDim(RbxAttribute attr) { float scale = attr.ReadFloat(); int offset = attr.ReadInt(); return(new UDim(scale, offset)); }
public NumberSequence ReadAttribute(RbxAttribute attr) { int numKeys = attr.ReadInt(); var keypoints = new NumberSequenceKeypoint[numKeys]; for (int i = 0; i < numKeys; i++) { float envelope = attr.ReadInt(), time = attr.ReadFloat(), value = attr.ReadFloat(); keypoints[i] = new NumberSequenceKeypoint(time, value, envelope); } return(new NumberSequence(keypoints)); }
public ColorSequence ReadAttribute(RbxAttribute attr) { int numKeys = attr.ReadInt(); var keypoints = new ColorSequenceKeypoint[numKeys]; for (int i = 0; i < numKeys; i++) { int envelope = attr.ReadInt(); float time = attr.ReadFloat(); Color3 value = Color3Token.ReadColor3(attr); keypoints[i] = new ColorSequenceKeypoint(time, value, envelope); } return(new ColorSequence(keypoints)); }
public float ReadAttribute(RbxAttribute attr) => attr.ReadFloat();