SpriteBaseTileUseUp Method |
Make the specified tile behave like it is "using up" one of the items tracked by the specified counter (requires
TouchTiles(TileCategoryName)).
Namespace: (Default Namespace)Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax public virtual int TileUseUp(
int TileValue,
Counter Counter,
int NewValue
)
Parameters
- TileValue
- Type: SystemInt32
Index of the tile to look for - Counter
- Type: (Default Namespace)Counter
Specifies a counter that will be affected. If this counter's value is
greater than 0, it will be decremented and the tile removed. - NewValue
- Type: SystemInt32
Specifies a new tile value that will replace the touched tile when
it is removed. This value is commonly 0, which usually represents a tileset's empty tile.
Return Value
Type:
Int32The number of tiles affected
Remarks This function will search through all tiles that have been touched (collected
by TouchTiles(TileCategoryName), and for each tile that it finds that matches the specified
TileValue, it will check Counter, and, if it
is greater than 0, decrement the counter and replace the tile with tile number
NewValue.
Only unprocessed tiles are considered. Once this function (or similar functions)
affects the tile, it is marked as processed. It is only marked as processed if
it is affected (if the counter changes).
See Also