Beispiel #1
0
 public void Parse(XmlElement xmlElement, ContentManager content)
 {
     Id = int.Parse(xmlElement.GetAttribute("id"));
     foreach (XmlElement childElement in xmlElement.ChildNodes)
     {
         if (childElement.Name == "image")
         {
             var image = new TileImage(_firstGid + Id);
             image.Parse(childElement, content);
             Images.Add(image);
         }
     }
 }
Beispiel #2
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            var texture = TileImage.GetTexture(Gid);

            spriteBatch.Draw(texture, new Vector2(X, Y - Height), Color.White);
        }