Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
TileMapPattern
Успадковує: Resource < RefCounted < Object
Затримайте шаблон, який буде скопіюватись з або вписаний в TileMaps.
Опис
Цей ресурс містить набір комірок для полегшення масових маніпуляцій з TileMap.
Візерунок завжди починається з координат (0, 0) і не може містити комірок з від'ємними координатами.
Методи
get_cell_alternative_tile(coords: Vector2i) const |
|
get_cell_atlas_coords(coords: Vector2i) const |
|
get_cell_source_id(coords: Vector2i) const |
|
get_size() const |
|
get_used_cells() const |
|
is_empty() const |
|
void |
remove_cell(coords: Vector2i, update_size: bool) |
void |
set_cell(coords: Vector2i, source_id: int = -1, atlas_coords: Vector2i = Vector2i(-1, -1), alternative_tile: int = -1) |
void |
Описи методів
int get_cell_alternative_tile(coords: Vector2i) const 🔗
Повертає ідентифікатор тайлової альтернативи клітинки у coords.
Vector2i get_cell_atlas_coords(coords: Vector2i) const 🔗
Повертаємо кахельну плитку координатами ID комірки параметрові коорди.
int get_cell_source_id(coords: Vector2i) const 🔗
Повертає ідентифікатор джерела плитки клітинки на coords.
Повертає розмір, в клітинках, з візерунка.
Array[Vector2i] get_used_cells() const 🔗
Повертає список використаних координат клітин у шаблоні.
bool has_cell(coords: Vector2i) const 🔗
Повертаємо Вашу увагу на те, що візерунок має плитку на даній координаті.
Повертає, чи є візерунок порожнім або ні.
void remove_cell(coords: Vector2i, update_size: bool) 🔗
Видаліть клітинку в даній координаті.
void set_cell(coords: Vector2i, source_id: int = -1, atlas_coords: Vector2i = Vector2i(-1, -1), alternative_tile: int = -1) 🔗
Встановлює ідентифікатори плиток для комірки за координатами coords. Див. TileMap.set_cell().
void set_size(size: Vector2i) 🔗
Встановлює розмір візерунка.