class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS Object TileData
Settings for a single tile in a TileSet.

TileData object represents a single tile in a TileSet. It is usually edited using the tileset editor, but it can be modified at runtime using TileMap._tile_data_runtime_update().

Signal changed<>():Signal

Emitted when any of the properties are changed.

bool flip_h<>():bool

If true, the tile will have its texture flipped horizontally.

bool flip_v<>():bool

If true, the tile will have its texture flipped vertically.

Material material<>():Material

The Material to use for this TileData. This can be a CanvasItemMaterial to use the default shader, or a ShaderMaterial to use a custom shader.

Color modulate<>():Color

Color modulation of the tile.

float probability<>():float

Relative probability of this tile being selected when drawing a pattern of random tiles.

int terrain<>():int

ID of the terrain from the terrain set that the tile uses.

int terrain_set<>():int

ID of the terrain set that the tile uses.

Vector2i texture_origin<>():Vector2i

Offsets the position of where the tile is drawn.

bool transpose<>():bool

If true, the tile will display transposed, i.e. with horizontal and vertical texture UVs swapped.

int y_sort_origin<>():int

Vertical point of the tile used for determining y-sorted order.

int z_index<>():int

Ordering index of this tile, relative to TileMap.

void add_collision_polygon<>( int layer_id=, layer_id:int=, ):void

Adds a collision polygon to the tile on the given TileSet physics layer.

void add_occluder_polygon<>( int layer_id=, layer_id:int=, ):void

Adds an occlusion polygon to the tile on the TileSet occlusion layer with index layer_id.

float get_collision_polygon_one_way_margin<>( int layer_id=, layer_id:int=, int polygon_index=, polygon_index:int=, ):float

Returns the one-way margin (for one-way platforms) of the polygon at index polygon_index for TileSet physics layer with index layer_id.

PackedVector2Array get_collision_polygon_points<>( int layer_id=, layer_id:int=, int polygon_index=, polygon_index:int=, ):PackedVector2Array

Returns the points of the polygon at index polygon_index for TileSet physics layer with index layer_id.

int get_collision_polygons_count<>( int layer_id=, layer_id:int=, ):int

Returns how many polygons the tile has for TileSet physics layer with index layer_id.

float get_constant_angular_velocity<>( int layer_id=, layer_id:int=, ):float

Returns the constant angular velocity applied to objects colliding with this tile.

Vector2 get_constant_linear_velocity<>( int layer_id=, layer_id:int=, ):Vector2

Returns the constant linear velocity applied to objects colliding with this tile.

Variant get_custom_data<>( String layer_name=, layer_name:String=, ):Variant

Returns the custom data value for custom data layer named layer_name. To check if a custom data layer exists, use has_custom_data().

Variant get_custom_data_by_layer_id<>( int layer_id=, layer_id:int=, ):Variant

Returns the custom data value for custom data layer with index layer_id.

NavigationPolygon get_navigation_polygon<>( int layer_id=, layer_id:int=, bool flip_h=false, flip_h:bool=false, bool flip_v=false, flip_v:bool=false, bool transpose=false, transpose:bool=false, ):NavigationPolygon

Returns the navigation polygon of the tile for the TileSet navigation layer with index layer_id.

flip_h, flip_v, and transpose allow transforming the returned polygon.

OccluderPolygon2D get_occluder<>( int layer_id=, layer_id:int=, bool flip_h=false, flip_h:bool=false, bool flip_v=false, flip_v:bool=false, bool transpose=false, transpose:bool=false, ):OccluderPolygon2D

Deprecated: Use get_occluder_polygon() instead.

Returns the occluder polygon of the tile for the TileSet occlusion layer with index layer_id.

flip_h, flip_v, and transpose allow transforming the returned polygon.

OccluderPolygon2D get_occluder_polygon<>( int layer_id=, layer_id:int=, int polygon_index=, polygon_index:int=, bool flip_h=false, flip_h:bool=false, bool flip_v=false, flip_v:bool=false, bool transpose=false, transpose:bool=false, ):OccluderPolygon2D

Returns the occluder polygon at index polygon_index from the TileSet occlusion layer with index layer_id.

The flip_h, flip_v, and transpose parameters can be true to transform the returned polygon.

int get_occluder_polygons_count<>( int layer_id=, layer_id:int=, ):int

Returns the number of occluder polygons of the tile in the TileSet occlusion layer with index layer_id.

int get_terrain_peering_bit<>( CellNeighbor peering_bit=, peering_bit:CellNeighbor=, ):int

Returns the tile's terrain bit for the given peering_bit direction. To check that a direction is valid, use is_valid_terrain_peering_bit().

bool has_custom_data<>( String layer_name=, layer_name:String=, ):bool

Returns whether there exists a custom data layer named layer_name.

bool is_collision_polygon_one_way<>( int layer_id=, layer_id:int=, int polygon_index=, polygon_index:int=, ):bool

Returns whether one-way collisions are enabled for the polygon at index polygon_index for TileSet physics layer with index layer_id.

bool is_valid_terrain_peering_bit<>( CellNeighbor peering_bit=, peering_bit:CellNeighbor=, ):bool

Returns whether the given peering_bit direction is valid for this tile.

void remove_collision_polygon<>( int layer_id=, layer_id:int=, int polygon_index=, polygon_index:int=, ):void

Removes the polygon at index polygon_index for TileSet physics layer with index layer_id.

void remove_occluder_polygon<>( int layer_id=, layer_id:int=, int polygon_index=, polygon_index:int=, ):void

Removes the polygon at index polygon_index for TileSet occlusion layer with index layer_id.

void set_collision_polygon_one_way<>( int layer_id=, layer_id:int=, int polygon_index=, polygon_index:int=, bool one_way=, one_way:bool=, ):void

Enables/disables one-way collisions on the polygon at index polygon_index for TileSet physics layer with index layer_id.

void set_collision_polygon_one_way_margin<>( int layer_id=, layer_id:int=, int polygon_index=, polygon_index:int=, float one_way_margin=, one_way_margin:float=, ):void

Sets the one-way margin (for one-way platforms) of the polygon at index polygon_index for TileSet physics layer with index layer_id.

void set_collision_polygon_points<>( int layer_id=, layer_id:int=, int polygon_index=, polygon_index:int=, PackedVector2Array polygon=, polygon:PackedVector2Array=, ):void

Sets the points of the polygon at index polygon_index for TileSet physics layer with index layer_id.

void set_collision_polygons_count<>( int layer_id=, layer_id:int=, int polygons_count=, polygons_count:int=, ):void

Sets the polygons count for TileSet physics layer with index layer_id.

void set_constant_angular_velocity<>( int layer_id=, layer_id:int=, float velocity=, velocity:float=, ):void

Sets the constant angular velocity. This does not rotate the tile. This angular velocity is applied to objects colliding with this tile.

void set_constant_linear_velocity<>( int layer_id=, layer_id:int=, Vector2 velocity=, velocity:Vector2=, ):void

Sets the constant linear velocity. This does not move the tile. This linear velocity is applied to objects colliding with this tile. This is useful to create conveyor belts.

void set_custom_data<>( String layer_name=, layer_name:String=, Variant value=, value:Variant=, ):void

Sets the tile's custom data value for the TileSet custom data layer with name layer_name.

void set_custom_data_by_layer_id<>( int layer_id=, layer_id:int=, Variant value=, value:Variant=, ):void

Sets the tile's custom data value for the TileSet custom data layer with index layer_id.

void set_navigation_polygon<>( int layer_id=, layer_id:int=, NavigationPolygon navigation_polygon=, navigation_polygon:NavigationPolygon=, ):void

Sets the navigation polygon for the TileSet navigation layer with index layer_id.

void set_occluder<>( int layer_id=, layer_id:int=, OccluderPolygon2D occluder_polygon=, occluder_polygon:OccluderPolygon2D=, ):void

Deprecated: Use set_occluder_polygon() instead.

Sets the occluder for the TileSet occlusion layer with index layer_id.

void set_occluder_polygon<>( int layer_id=, layer_id:int=, int polygon_index=, polygon_index:int=, OccluderPolygon2D polygon=, polygon:OccluderPolygon2D=, ):void

Sets the occluder for polygon with index polygon_index in the TileSet occlusion layer with index layer_id.

void set_occluder_polygons_count<>( int layer_id=, layer_id:int=, int polygons_count=, polygons_count:int=, ):void

Sets the occluder polygon count in the TileSet occlusion layer with index layer_id.

void set_terrain_peering_bit<>( CellNeighbor peering_bit=, peering_bit:CellNeighbor=, int terrain=, terrain:int=, ):void

Sets the tile's terrain bit for the given peering_bit direction. To check that a direction is valid, use is_valid_terrain_peering_bit().




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...