TileData

Inherits: Object

Methods

void

add_collision_polygon ( int layer_id )

float

get_collision_polygon_one_way_margin ( int layer_id, int polygon_index ) const

PackedVector2Array

get_collision_polygon_points ( int layer_id, int polygon_index ) const

int

get_collision_polygons_count ( int layer_id ) const

float

get_constant_angular_velocity ( int layer_id ) const

Vector2

get_constant_linear_velocity ( int layer_id ) const

Variant

get_custom_data ( String layer_name ) const

Variant

get_custom_data_by_layer_id ( int layer_id ) const

NavigationPolygon

get_navigation_polygon ( int layer_id ) const

OccluderPolygon2D

get_occluder ( int layer_id ) const

int

get_peering_bit_terrain ( CellNeighbor peering_bit ) const

bool

is_collision_polygon_one_way ( int layer_id, int polygon_index ) const

void

remove_collision_polygon ( int layer_id, int polygon_index )

void

set_collision_polygon_one_way ( int layer_id, int polygon_index, bool one_way )

void

set_collision_polygon_one_way_margin ( int layer_id, int polygon_index, float one_way_margin )

void

set_collision_polygon_points ( int layer_id, int polygon_index, PackedVector2Array polygon )

void

set_collision_polygons_count ( int layer_id, int polygons_count )

void

set_constant_angular_velocity ( int layer_id, float velocity )

void

set_constant_linear_velocity ( int layer_id, Vector2 velocity )

void

set_custom_data ( String layer_name, Variant value )

void

set_custom_data_by_layer_id ( int layer_id, Variant value )

void

set_navigation_polygon ( int layer_id, NavigationPolygon navigation_polygon )

void

set_occluder ( int layer_id, OccluderPolygon2D occluder_polygon )

void

set_peering_bit_terrain ( CellNeighbor peering_bit, int terrain )

Signals

  • changed ( )

Property Descriptions

Default

false

Setter

set_flip_h(value)

Getter

get_flip_h()


Default

false

Setter

set_flip_v(value)

Getter

get_flip_v()


Setter

set_material(value)

Getter

get_material()


Default

Color(1, 1, 1, 1)

Setter

set_modulate(value)

Getter

get_modulate()


Default

1.0

Setter

set_probability(value)

Getter

get_probability()


  • int terrain_set

Default

-1

Setter

set_terrain_set(value)

Getter

get_terrain_set()


Default

Vector2i(0, 0)

Setter

set_texture_offset(value)

Getter

get_texture_offset()


Default

false

Setter

set_transpose(value)

Getter

get_transpose()


  • int y_sort_origin

Default

0

Setter

set_y_sort_origin(value)

Getter

get_y_sort_origin()


Default

0

Setter

set_z_index(value)

Getter

get_z_index()

Method Descriptions

  • void add_collision_polygon ( int layer_id )

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


  • float get_collision_polygon_one_way_margin ( int layer_id, int polygon_index ) const

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


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 ) const

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


  • float get_constant_angular_velocity ( int layer_id ) const

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


  • Vector2 get_constant_linear_velocity ( int layer_id ) const

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


Returns the custom data value for custom data layer named layer_name.


  • Variant get_custom_data_by_layer_id ( int layer_id ) const

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


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


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


Returns the tile's terrain bit for the given peering_bit direction.


  • bool is_collision_polygon_one_way ( int layer_id, int polygon_index ) const

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


  • void remove_collision_polygon ( int layer_id, int polygon_index )

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


  • void set_collision_polygon_one_way ( int layer_id, int polygon_index, bool one_way )

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, int polygon_index, float one_way_margin )

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


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, int polygons_count )

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


  • void set_constant_angular_velocity ( int layer_id, float velocity )

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, Vector2 velocity )

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.


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, Variant value )

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


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


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


Sets the tile's terrain bit for the given peering_bit direction.