Property | Type | Description | |
---|---|---|---|
ImgAuto | Microsoft.Xna.Framework.Graphics.Texture2D | ||
ImgAutoAlt | Microsoft.Xna.Framework.Graphics.Texture2D | ||
auto | int | ||
collideIndex | int | ||
drawIndex | int | ||
heightInTiles | int | ||
refresh | bool | ||
startingIndex | int | ||
totalTiles | int | ||
widthInTiles | int |
Property | Type | Description | |
---|---|---|---|
_block | FlxObject | ||
_boundsVisible | bool | ||
_data | int[] | ||
_flashRect | |||
_flashRect2 | |||
_rects | List |
||
_screenCols | int | ||
_screenRows | int | ||
_tileBitmap | Microsoft.Xna.Framework.Graphics.Texture2D | ||
_tileHeight | int | ||
_tileWidth | int |
Method | Description | |
---|---|---|
FlxTilemap ( ) : System |
The tilemap constructor just initializes some basic variables.
|
|
Overlaps ( FlxObject Core ) : bool |
Checks for overlaps between the provided object and any tiles above the collision index. @param Core The
|
|
OverlapsPoint ( float X, float Y ) : bool |
Checks to see if a point in 2D space overlaps a solid tile. @param X The X coordinate of the point. @param Y The Y coordinate of the point. @param PerPixel Not available in
|
|
OverlapsPoint ( float X, float Y, bool PerPixel ) : bool | ||
PreCollide ( FlxObject Object ) : void |
|
|
RefreshHulls ( ) : void |
Called by
|
|
Render ( |
Draws the tilemap.
|
|
arrayToCSV ( int Data, int Width ) : string |
Converts a one-dimensional array of tile data to a comma-separated string. @param Data An array full of integer tile references. @param Width The number of tiles in each row. @return A comma-separated string containing the level data in a
|
|
bitmapToCSV ( Microsoft.Xna.Framework.Graphics.Texture2D bitmapData ) : string |
Converts a
|
|
bitmapToCSV ( Microsoft.Xna.Framework.Graphics.Texture2D bitmapData, bool Invert ) : string | ||
follow ( ) : void |
Call this function to lock the automatic camera to the map's edges. @param Border Adjusts the camera follow boundary by whatever number of tiles you specify here. Handy for blocking off deadends that are offscreen, etc. Use a negative number to add padding instead of hiding the edges.
|
|
follow ( int Border ) : void | ||
getTile ( int X, int Y ) : int |
Check the value of a particular tile. @param X The X coordinate of the tile (in tiles, not pixels). @param Y The Y coordinate of the tile (in tiles, not pixels). @return A uint containing the value of the tile at this spot in the array.
|
|
getTileByIndex ( int Index ) : int |
Get the value of a tile in the tilemap by index. @param Index The slot in the data array (Y/// widthInTiles + X) where this tile is stored. @return A uint containing the value of the tile at this spot in the array.
|
|
loadMap ( string MapData, Microsoft.Xna.Framework.Graphics.Texture2D TileGraphic ) : |
Load the tilemap with string data and a tile graphic. @param MapData A string of comma and line-return delineated indices indicating what order the tiles should go in. @param TileGraphic All the tiles you want to use, arranged in a strip corresponding to the numbers in MapData. @param TileWidth The width of your tiles (e.g. 8) - defaults to height of the tile graphic if unspecified. @param TileHeight The height of your tiles (e.g. 8) - defaults to width if unspecified. @return A pointer this instance of FlxTilemap, for chaining as usual :)
|
|
loadMap ( string MapData, Microsoft.Xna.Framework.Graphics.Texture2D TileGraphic, int TileWidth, int TileHeight ) : |
||
ray ( int StartX, int StartY, int EndX, int EndY, Vector2 Result, int Resolution ) : bool |
Shoots a ray from the start point to the end point. If/when it passes through a tile, it stores and returns that point. @param StartX The X component of the ray's start. @param StartY The Y component of the ray's start. @param EndX The X component of the ray's end. @param EndY The Y component of the ray's end. @param Result A
|
|
setCallback ( int Tile, int Callback, int Range ) : void |
Bind a function Callback(Core:FlxCore,X:uint,Y:uint,Tile:uint) to a range of tiles. @param Tile The tile to trigger the callback. @param Callback The function to trigger. Parameters should be
|
|
setTile ( int X, int Y, int Tile ) : bool |
Change the data and graphic of a tile in the tilemap. @param X The X coordinate of the tile (in tiles, not pixels). @param Y The Y coordinate of the tile (in tiles, not pixels). @param Tile The new integer data you wish to inject. @param UpdateGraphics Whether the graphical representation of this tile should change. @return Whether or not the tile was actually changed.
|
|
setTile ( int X, int Y, int Tile, bool UpdateGraphics ) : bool | ||
setTileByIndex ( int Index, int Tile, bool UpdateGraphics ) : bool |
Change the data and graphic of a tile in the tilemap. @param Index The slot in the data array (Y/// widthInTiles + X) where this tile is stored. @param Tile The new integer data you wish to inject. @param UpdateGraphics Whether the graphical representation of this tile should change. @return Whether or not the tile was actually changed.
|
Method | Description | |
---|---|---|
autoTile ( int Index ) : void |
An internal function used by the binary auto-tilers. @param Index The index of the tile you want to analyze.
|
|
generateBoundingTiles ( ) : void |
Generates a bounding box version of the tiles, flixel should call this automatically when necessary.
|
|
updateTile ( int Index ) : void |
Internal function used in setTileByIndex() and the constructor to update the map. @param Index The index of the tile you want to update.
|
public OverlapsPoint ( float X, float Y ) : bool | ||
X | float | |
Y | float | |
return | bool |
public OverlapsPoint ( float X, float Y, bool PerPixel ) : bool | ||
X | float | |
Y | float | |
PerPixel | bool | |
return | bool |
public PreCollide ( FlxObject Object ) : void | ||
Object | FlxObject | |
return | void |
public Render ( |
||
spriteBatch | ||
return | void |
public static arrayToCSV ( int Data, int Width ) : string | ||
Data | int | |
Width | int | |
return | string |
public static bitmapToCSV ( Microsoft.Xna.Framework.Graphics.Texture2D bitmapData ) : string | ||
bitmapData | Microsoft.Xna.Framework.Graphics.Texture2D | |
return | string |
public static bitmapToCSV ( Microsoft.Xna.Framework.Graphics.Texture2D bitmapData, bool Invert ) : string | ||
bitmapData | Microsoft.Xna.Framework.Graphics.Texture2D | |
Invert | bool | |
return | string |
public loadMap ( string MapData, Microsoft.Xna.Framework.Graphics.Texture2D TileGraphic ) : |
||
MapData | string | |
TileGraphic | Microsoft.Xna.Framework.Graphics.Texture2D | |
return |
public loadMap ( string MapData, Microsoft.Xna.Framework.Graphics.Texture2D TileGraphic, int TileWidth, int TileHeight ) : |
||
MapData | string | |
TileGraphic | Microsoft.Xna.Framework.Graphics.Texture2D | |
TileWidth | int | |
TileHeight | int | |
return |
public ray ( int StartX, int StartY, int EndX, int EndY, Vector2 Result, int Resolution ) : bool | ||
StartX | int | |
StartY | int | |
EndX | int | |
EndY | int | |
Result | Vector2 | |
Resolution | int | |
return | bool |
public setCallback ( int Tile, int Callback, int Range ) : void | ||
Tile | int | |
Callback | int | |
Range | int | |
return | void |
public setTile ( int X, int Y, int Tile ) : bool | ||
X | int | |
Y | int | |
Tile | int | |
return | bool |
public setTile ( int X, int Y, int Tile, bool UpdateGraphics ) : bool | ||
X | int | |
Y | int | |
Tile | int | |
UpdateGraphics | bool | |
return | bool |
public setTileByIndex ( int Index, int Tile, bool UpdateGraphics ) : bool | ||
Index | int | |
Tile | int | |
UpdateGraphics | bool | |
return | bool |
public static Texture2D,Microsoft.Xna.Framework.Graphics ImgAuto | ||
return | Microsoft.Xna.Framework.Graphics.Texture2D |
public static Texture2D,Microsoft.Xna.Framework.Graphics ImgAutoAlt | ||
return | Microsoft.Xna.Framework.Graphics.Texture2D |
protected Rectangle,Microsoft.Xna.Framework _flashRect | ||
return |
protected Rectangle,Microsoft.Xna.Framework _flashRect2 | ||
return |
protected Texture2D,Microsoft.Xna.Framework.Graphics _tileBitmap | ||
return | Microsoft.Xna.Framework.Graphics.Texture2D |