Time for action – the TileMap module – part 1
In the Tile Engine project, rename the
Class1.vb
file that was generated by the Game Library project template toTileMap.vb
by right-clicking onClass1.vb
and selecting Rename. Visual Studio will ask if you wish to rename all references to the class as well. Go ahead and click on Yes. We have not referenced our new class anywhere, so no other code is actually updated.Double-click on the newly renamed
TileMap.vb
file to open it in the editor.Modify the declaration of the
TileMap
class to add twoImports
directives and to change the class into aPublic
Module
. The entire text of the file should now be:Imports System.Runtime.Serialization.Formatters.Binary Imports System.IO Public Module TileMap End Module
Add declarations to the TileMap module:
#Region "Declarations" Public Const TileWidth As Integer = 48 Public Const TileHeight As Integer = 48 Public Const MapWidth As Integer = 160 Public Const MapHeight As Integer = 12 Public Const MapLayers...