示例#1
0
文件: IO.cs 项目: kou-yeung/Effekseer
 public static void LoadFromElement(XmlElement e, Value.Float value, bool isClip)
 {
     var text = e.GetText();
     var parsed = 0.0f;
     if (float.TryParse(text, System.Globalization.NumberStyles.Float, Setting.NFI, out parsed))
     {
         value.SetValue(parsed);
     }
 }
示例#2
0
文件: IO.cs 项目: kou-yeung/Effekseer
 public static void LoadFromElement(XmlElement e, Value.Boolean value, bool isClip)
 {
     var text = e.GetText();
     var parsed = false;
     if (bool.TryParse(text, out parsed))
     {
         value.SetValue(parsed);
     }
 }
示例#3
0
文件: IO.cs 项目: kou-yeung/Effekseer
 public static void LoadFromElement(XmlElement e, Value.EnumBase value, bool isClip)
 {
     var text = e.GetText();
     var parsed = 0;
     if (int.TryParse(text, out parsed))
     {
         value.SetValue(parsed);
     }
 }
示例#4
0
文件: IO.cs 项目: kou-yeung/Effekseer
 public static void LoadFromElement(XmlElement e, Value.String value, bool isClip)
 {
     var text = e.GetText();
     value.SetValue(text);
 }
示例#5
0
文件: IO.cs 项目: kou-yeung/Effekseer
        public static void LoadFromElement(XmlElement e, Value.Path value, bool isClip)
        {
            var text = e.GetText();

            if (!isClip)
                value.SetRelativePath(text);
            else
                value.SetAbsolutePath(text);
        }