Public delegate void MapChangedEventHandler( object sender, MapChangedEventArgs e) ![]() The application should be able to get us the data we need via its name. We use the delegate RequestTexture to get the image data from whatever application is using the Map class. In the case of the Editor, the images are saved in a folder with the map data. Depending if we are in a game or in the Editor, the image data could be in the memory or on disk somewhere. The map data that is saved to file only includes the name and ID of the Tileset, so we need a way to get the image data. The Map class also has functions for loading a map from file or from a stream. TileSize is the size in pixels of each tile. So we have a few more properties for the width and height of the map, Width and Height are the size in tiles of the map, RealWidth and RealHeight are the size in pixels of the map calculated by using the current tilesize. This one uses a List to store the layers of the map, and adds a little more information that we need to fully describe the map. Here we are, the Map class, this one is fairly important. ![]() Public virtual void Load(Stream dataStream, RequestTexture requestTexture) ![]() Public void Load( string Path, RequestTexture requestTexture) Public delegate Image RequestTexture( string Name)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |