Constructor Tileset
Tileset(string, Texture2D, int, int)
Initializes a new instance of the Tileset class.
Parameters
name
stringThe name to assign the Tileset.
texture
Texture2DThe source texture used by this Tileset.
tileWidth
intThe width, in pixels, of each tile in this Tileset.
tileHeight
intThe height, in pixels, of each tile in this Tileset.
Remarks
The TexturetileWidth
and tileHeight
specified. Both of these values
must be greater than zero and the width of the texture
must divide evenly by
the tileWidth
and the height of the texture
must divide evenly by the
tileHeight
Exceptions
- Argument
Out OfRange Exception Thrown if the
tileWidth
ortileHeight
values are less than one.- Argument
Exception Thrown if the width of the
texture
does not divide evenly by thetileWidth
specified or if the height of thetexture
does not divide evenly by thetileHeight
specified.