文件名称:Tiled for C#
文件大小:298KB
文件格式:RAR
更新时间:2016-02-21 05:14:48
Tiled C#
How to 1.) Download Tiled.rar 2.) Copy the dlls to somewhere you can use them, or take a look at the Visual Studio project. 3.) Add a reference to Tiled.dll to your game, and a reference to TMXProcessorLib.dll to your gamecontent. 4.) Create a map using Tiled. 5.) Add the .tmx-file and tilesets to your gamecontent. 6.) Choose TMX Importer and TMX Processor for .tmx-files. 7.) Write your LoadContent-method: protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); device = graphics.GraphicsDevice; map = Content.Load("map"); // name of the .tmx-file without ".tmx" TilesetManager.LoadTextures(Content); } 8.) Let it be drawn: protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.Blue); spriteBatch.Begin(); spriteBatch.Draw(map, new Vector2()); spriteBatch.End(); base.Draw(gameTime); } 9.) Start!