public static TmxAnimation FromTileId(uint globalTileId) { TmxAnimation tmxAnimation = new TmxAnimation(); TmxFrame item = TmxFrame.FromTileId(globalTileId); tmxAnimation.Frames.Add(item); return(tmxAnimation); }
public static TmxFrame FromTileId(uint tileId) { TmxFrame tmxFrame = new TmxFrame(); tmxFrame.GlobalTileId = tileId; tmxFrame.DurationMs = 0; return tmxFrame; }
public static TmxFrame FromTileId(uint tileId) { TmxFrame tmxFrame = new TmxFrame(); tmxFrame.GlobalTileId = tileId; tmxFrame.DurationMs = 0; return(tmxFrame); }
// Returns an single frame animation public static TmxAnimation FromTileId(uint globalTileId) { TmxAnimation tmxAnimation = new TmxAnimation(); TmxFrame tmxFrame = TmxFrame.FromTileId(globalTileId); tmxAnimation.Frames.Add(tmxFrame); return tmxAnimation; }
public static TmxFrame FromXml(XElement xml, uint globalStartId) { TmxFrame tmxFrame = new TmxFrame(); uint attributeAsUInt = TmxHelper.GetAttributeAsUInt(xml, "tileid"); tmxFrame.GlobalTileId = attributeAsUInt + globalStartId; tmxFrame.DurationMs = TmxHelper.GetAttributeAsInt(xml, "duration", 100); return(tmxFrame); }
public static TmxFrame FromXml(XElement xml, uint globalStartId) { TmxFrame tmxFrame = new TmxFrame(); uint localTileId = TmxHelper.GetAttributeAsUInt(xml, "tileid"); tmxFrame.GlobalTileId = localTileId + globalStartId; tmxFrame.DurationMs = TmxHelper.GetAttributeAsInt(xml, "duration", 100); return tmxFrame; }
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); }