public static TmxAnimation FromXml(XElement xml, uint globalStartId) { TmxAnimation tmxAnimation = new TmxAnimation(); foreach (XElement item in xml.Elements("frame")) { TmxFrame tmxFrame = TmxFrame.FromXml(item, globalStartId); tmxAnimation.Frames.Add(tmxFrame); tmxAnimation.TotalTimeMs += tmxFrame.DurationMs; } return(tmxAnimation); }
public static TmxAnimation FromXml(XElement xml, uint globalStartId) { TmxAnimation tmxAnimation = new TmxAnimation(); foreach (var xmlFrame in xml.Elements("frame")) { TmxFrame tmxFrame = TmxFrame.FromXml(xmlFrame, globalStartId); tmxAnimation.Frames.Add(tmxFrame); } return(tmxAnimation); }