protected override IKeyframe DeserializeKeyframe(XElement serializedData) { SpriteSheetKeyframe newKeyframe = new SpriteSheetKeyframe(); newKeyframe.Deserialize(serializedData); return newKeyframe; }
protected override IKeyframe DeserializeKeyframe(XElement serializedData) { SpriteSheetKeyframe newKeyframe = new SpriteSheetKeyframe(); newKeyframe.Deserialize(serializedData); return(newKeyframe); }
private static void AddSpriteSheetKeyframe(string sequenceName, XElement xmlFrameData) { SpriteSheetKeyframe newKeyframe = new SpriteSheetKeyframe(); newKeyframe.DurationInMilliseconds = Convert.ToInt32(xmlFrameData.Attribute("duration").Value); if (xmlFrameData.Element("texturename") != null) { newKeyframe.TextureName = xmlFrameData.Element("texturename").Value; } else { newKeyframe.TextureName = ""; } newKeyframe.SourceArea = new Rectangle( Convert.ToInt32(xmlFrameData.Element("sourcearea").Attribute("left").Value), Convert.ToInt32(xmlFrameData.Element("sourcearea").Attribute("top").Value), Convert.ToInt32(xmlFrameData.Element("sourcearea").Attribute("width").Value), Convert.ToInt32(xmlFrameData.Element("sourcearea").Attribute("height").Value)); AddKeyframe(sequenceName, newKeyframe); }