2019-01-30 06:36:56 +00:00
|
|
|
|
using System.Xml;
|
|
|
|
|
|
2019-02-01 17:19:20 +00:00
|
|
|
|
namespace RobloxFiles.XmlFormat.PropertyTokens
|
2019-01-30 06:36:56 +00:00
|
|
|
|
{
|
|
|
|
|
public class FloatToken : IXmlPropertyToken
|
|
|
|
|
{
|
|
|
|
|
public string Token => "float";
|
|
|
|
|
|
|
|
|
|
public bool ReadToken(Property prop, XmlNode token)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
float value = XmlPropertyTokens.ParseFloat(token.InnerText);
|
|
|
|
|
prop.Type = PropertyType.Float;
|
|
|
|
|
prop.Value = value;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
catch
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|