本文整理汇总了C++中Tileset::get_tile_pattern方法的典型用法代码示例。如果您正苦于以下问题:C++ Tileset::get_tile_pattern方法的具体用法?C++ Tileset::get_tile_pattern怎么用?C++ Tileset::get_tile_pattern使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tileset
的用法示例。
在下文中一共展示了Tileset::get_tile_pattern方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Entity
/**
* \brief Creates a new dynamic tile on the map.
* \param name a name to identify this tile
* \param layer layer of the tile
* \param xy Coordinates of the tile on the map
* \param size Size of the tile (the pattern can be repeated)
* \param tileset The tileset to use.
* \param tile_pattern_id id of the tile pattern in the tileset
* \param enabled true to make the tile initially enabled.
*/
DynamicTile::DynamicTile(
const std::string& name,
int layer,
const Point& xy,
const Size& size,
Tileset& tileset,
const std::string& tile_pattern_id,
bool enabled
) :
Entity(name, 0, layer, xy, size),
tile_pattern_id(tile_pattern_id),
tile_pattern(tileset.get_tile_pattern(tile_pattern_id)) {
set_enabled(enabled);
}
示例2: MapEntity
/**
* \brief Creates a new dynamic tile on the map.
* \param name a name to identify this tile
* \param layer layer of the tile
* \param x x position of the tile on the map
* \param y y position of the tile on the map
* \param width width of the tile (the pattern can be repeated)
* \param height height of the tile (the pattern can be repeated)
* \param tileset The tileset to use.
* \param tile_pattern_id id of the tile pattern in the tileset
* \param enabled true to make the tile initially enabled.
*/
DynamicTile::DynamicTile(
const std::string& name,
Layer layer,
int x,
int y,
int width,
int height,
Tileset& tileset,
const std::string& tile_pattern_id,
bool enabled):
MapEntity(name, 0, layer, x, y, width, height),
tile_pattern_id(tile_pattern_id),
tile_pattern(tileset.get_tile_pattern(tile_pattern_id)) {
set_enabled(enabled);
}