protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); cursor = new MagicTexture(Content.Load <Texture2D>("Imagens/cursor"), new Rectangle(0, 0, 100, 100), Facing.L); tex = Content.Load <Texture2D>("Imagens/grad"); MagicTexture test2 = new MagicTexture(tex, new Rectangle(0, 0, tex.Width, tex.Height), Facing.N); b = new Button(test2, new Vector2(300, 100), "TilesetEditor"); }
private Tileset GetTileSet() { XDocument doc = XDocument.Load("Content/XML/TestTileset.xml"); int tx = int.Parse(doc.Element("Tileset").Attribute("x").Value); int ty = int.Parse(doc.Element("Tileset").Attribute("y").Value); Tile[,] tiles2 = new Tile[tx, ty]; foreach (XElement tile in doc.Element("Tileset").Elements("Tile")) { MagicTexture ttt = new MagicTexture(Content.Load <Texture2D>(tile.Value), new Rectangle(0, 0, 200, 100), Facing.N); int x = int.Parse(tile.Attribute("x").Value); int y = int.Parse(tile.Attribute("y").Value); tiles2[x, y] = new Tile(ttt, Vector2.Zero); } return(new Tileset(tiles2, tx, ty, 200, 100)); }
public Tile GetTile(string tileName_) { MagicTexture ttt = new MagicTexture(Content.Load <Texture2D>(tileName_), new Rectangle(0, 0, 200, 100), Facing.N); return(new Tile(ttt, Vector2.Zero)); }
public Button(MagicTexture tex_, Vector2 pos_, string action_) : base(tex_, pos_) { action = action_; }
public Tile(MagicTexture tex_, Vector2 pos_) : base(tex_, pos_) { }
public Sprite(MagicTexture tex_, Vector2 pos_) { tex = tex_; pos = pos_; }