Documentation
¶
Overview ¶
Package TileSet provides methods for working with TileSet object instances.
Index ¶
- type Advanced
- type Any
- type CellNeighbor
- type Expanded
- func (self Expanded) AddCustomDataLayer(to_position int)
- func (self Expanded) AddNavigationLayer(to_position int)
- func (self Expanded) AddOcclusionLayer(to_position int)
- func (self Expanded) AddPattern(pattern TileMapPattern.Instance, index int) int
- func (self Expanded) AddPhysicsLayer(to_position int)
- func (self Expanded) AddSource(source TileSetSource.Instance, atlas_source_id_override int) int
- func (self Expanded) AddTerrain(terrain_set int, to_position int)
- func (self Expanded) AddTerrainSet(to_position int)
- func (self Expanded) GetPattern(index int) TileMapPattern.Instance
- type Extension
- type ID
- type Instance
- func (self Instance) AddCustomDataLayer()
- func (self Instance) AddNavigationLayer()
- func (self Instance) AddOcclusionLayer()
- func (self Instance) AddPattern(pattern TileMapPattern.Instance) int
- func (self Instance) AddPhysicsLayer()
- func (self Instance) AddSource(source TileSetSource.Instance) int
- func (self Instance) AddTerrain(terrain_set int)
- func (self Instance) AddTerrainSet()
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) AsTileSet() Instance
- func (self Instance) CleanupInvalidTileProxies()
- func (self Instance) ClearTileProxies()
- func (self Instance) GetAlternativeLevelTileProxy(source_from int, coords_from Vector2i.XY, alternative_from int) []any
- func (self Instance) GetCoordsLevelTileProxy(source_from int, coords_from Vector2i.XY) []any
- func (self Instance) GetCustomDataLayerByName(layer_name string) int
- func (self Instance) GetCustomDataLayerName(layer_index int) string
- func (self Instance) GetCustomDataLayerType(layer_index int) variant.Type
- func (self Instance) GetCustomDataLayersCount() int
- func (self Instance) GetNavigationLayerLayerValue(layer_index int, layer_number int) bool
- func (self Instance) GetNavigationLayerLayers(layer_index int) int
- func (self Instance) GetNavigationLayersCount() int
- func (self Instance) GetNextSourceId() int
- func (self Instance) GetOcclusionLayerLightMask(layer_index int) int
- func (self Instance) GetOcclusionLayerSdfCollision(layer_index int) bool
- func (self Instance) GetOcclusionLayersCount() int
- func (self Instance) GetPattern() TileMapPattern.Instance
- func (self Instance) GetPatternsCount() int
- func (self Instance) GetPhysicsLayerCollisionLayer(layer_index int) int
- func (self Instance) GetPhysicsLayerCollisionMask(layer_index int) int
- func (self Instance) GetPhysicsLayerCollisionPriority(layer_index int) Float.X
- func (self Instance) GetPhysicsLayerPhysicsMaterial(layer_index int) PhysicsMaterial.Instance
- func (self Instance) GetPhysicsLayersCount() int
- func (self Instance) GetSource(source_id int) TileSetSource.Instance
- func (self Instance) GetSourceCount() int
- func (self Instance) GetSourceId(index int) int
- func (self Instance) GetSourceLevelTileProxy(source_from int) int
- func (self Instance) GetTerrainColor(terrain_set int, terrain_index int) Color.RGBA
- func (self Instance) GetTerrainName(terrain_set int, terrain_index int) string
- func (self Instance) GetTerrainSetMode(terrain_set int) TerrainMode
- func (self Instance) GetTerrainSetsCount() int
- func (self Instance) GetTerrainsCount(terrain_set int) int
- func (self Instance) HasAlternativeLevelTileProxy(source_from int, coords_from Vector2i.XY, alternative_from int) bool
- func (self Instance) HasCoordsLevelTileProxy(source_from int, coords_from Vector2i.XY) bool
- func (self Instance) HasCustomDataLayerByName(layer_name string) bool
- func (self Instance) HasSource(source_id int) bool
- func (self Instance) HasSourceLevelTileProxy(source_from int) bool
- func (self Instance) ID() ID
- func (self Instance) MapTileProxy(source_from int, coords_from Vector2i.XY, alternative_from int) []any
- func (self Instance) MoveCustomDataLayer(layer_index int, to_position int)
- func (self Instance) MoveNavigationLayer(layer_index int, to_position int)
- func (self Instance) MoveOcclusionLayer(layer_index int, to_position int)
- func (self Instance) MovePhysicsLayer(layer_index int, to_position int)
- func (self Instance) MoveTerrain(terrain_set int, terrain_index int, to_position int)
- func (self Instance) MoveTerrainSet(terrain_set int, to_position int)
- func (self Instance) RemoveAlternativeLevelTileProxy(source_from int, coords_from Vector2i.XY, alternative_from int)
- func (self Instance) RemoveCoordsLevelTileProxy(source_from int, coords_from Vector2i.XY)
- func (self Instance) RemoveCustomDataLayer(layer_index int)
- func (self Instance) RemoveNavigationLayer(layer_index int)
- func (self Instance) RemoveOcclusionLayer(layer_index int)
- func (self Instance) RemovePattern(index int)
- func (self Instance) RemovePhysicsLayer(layer_index int)
- func (self Instance) RemoveSource(source_id int)
- func (self Instance) RemoveSourceLevelTileProxy(source_from int)
- func (self Instance) RemoveTerrain(terrain_set int, terrain_index int)
- func (self Instance) RemoveTerrainSet(terrain_set int)
- func (self Instance) SetAlternativeLevelTileProxy(source_from int, coords_from Vector2i.XY, alternative_from int, source_to int, ...)
- func (self Instance) SetCoordsLevelTileProxy(p_source_from int, coords_from Vector2i.XY, source_to int, ...)
- func (self Instance) SetCustomDataLayerName(layer_index int, layer_name string)
- func (self Instance) SetCustomDataLayerType(layer_index int, layer_type variant.Type)
- func (self Instance) SetNavigationLayerLayerValue(layer_index int, layer_number int, value bool)
- func (self Instance) SetNavigationLayerLayers(layer_index int, layers int)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetOcclusionLayerLightMask(layer_index int, light_mask int)
- func (self Instance) SetOcclusionLayerSdfCollision(layer_index int, sdf_collision bool)
- func (self Instance) SetPhysicsLayerCollisionLayer(layer_index int, layer int)
- func (self Instance) SetPhysicsLayerCollisionMask(layer_index int, mask int)
- func (self Instance) SetPhysicsLayerCollisionPriority(layer_index int, priority Float.X)
- func (self Instance) SetPhysicsLayerPhysicsMaterial(layer_index int, physics_material PhysicsMaterial.Instance)
- func (self Instance) SetSourceId(source_id int, new_source_id int)
- func (self Instance) SetSourceLevelTileProxy(source_from int, source_to int)
- func (self Instance) SetTerrainColor(terrain_set int, terrain_index int, color Color.RGBA)
- func (self Instance) SetTerrainName(terrain_set int, terrain_index int, name string)
- func (self Instance) SetTerrainSetMode(terrain_set int, mode TerrainMode)
- func (self Instance) SetTileLayout(value TileLayout)
- func (self Instance) SetTileOffsetAxis(value TileOffsetAxis)
- func (self Instance) SetTileShape(value TileShape)
- func (self Instance) SetTileSize(value Vector2i.XY)
- func (self Instance) SetUvClipping(value bool)
- func (self Instance) TileLayout() TileLayout
- func (self Instance) TileOffsetAxis() TileOffsetAxis
- func (self Instance) TileShape() TileShape
- func (self Instance) TileSize() Vector2i.XY
- func (self Instance) UvClipping() bool
- func (self Instance) Virtual(name string) reflect.Value
- type TerrainMode
- type TileLayout
- type TileOffsetAxis
- type TileShape
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type CellNeighbor ¶
type CellNeighbor int //gd:TileSet.CellNeighbor
const ( /*Neighbor on the right side.*/ CellNeighborRightSide CellNeighbor = 0 /*Neighbor in the right corner.*/ CellNeighborRightCorner CellNeighbor = 1 /*Neighbor on the bottom right side.*/ CellNeighborBottomRightSide CellNeighbor = 2 /*Neighbor in the bottom right corner.*/ CellNeighborBottomRightCorner CellNeighbor = 3 /*Neighbor on the bottom side.*/ CellNeighborBottomSide CellNeighbor = 4 /*Neighbor in the bottom corner.*/ CellNeighborBottomCorner CellNeighbor = 5 /*Neighbor on the bottom left side.*/ CellNeighborBottomLeftSide CellNeighbor = 6 /*Neighbor in the bottom left corner.*/ CellNeighborBottomLeftCorner CellNeighbor = 7 /*Neighbor on the left side.*/ CellNeighborLeftSide CellNeighbor = 8 /*Neighbor in the left corner.*/ CellNeighborLeftCorner CellNeighbor = 9 /*Neighbor on the top left side.*/ CellNeighborTopLeftSide CellNeighbor = 10 /*Neighbor in the top left corner.*/ CellNeighborTopLeftCorner CellNeighbor = 11 /*Neighbor on the top side.*/ CellNeighborTopSide CellNeighbor = 12 /*Neighbor in the top corner.*/ CellNeighborTopCorner CellNeighbor = 13 /*Neighbor on the top right side.*/ CellNeighborTopRightSide CellNeighbor = 14 /*Neighbor in the top right corner.*/ CellNeighborTopRightCorner CellNeighbor = 15 )
type Expanded ¶
func (Expanded) AddCustomDataLayer ¶
Adds a custom data layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Custom data layers allow assigning custom properties to atlas tiles.
func (Expanded) AddNavigationLayer ¶
Adds a navigation layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Navigation layers allow assigning a navigable area to atlas tiles.
func (Expanded) AddOcclusionLayer ¶
Adds an occlusion layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Occlusion layers allow assigning occlusion polygons to atlas tiles.
func (Expanded) AddPattern ¶
func (self Expanded) AddPattern(pattern TileMapPattern.Instance, index int) int
Adds a [TileMapPattern] to be stored in the TileSet resource. If provided, insert it at the given [param index].
func (Expanded) AddPhysicsLayer ¶
Adds a physics layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Physics layers allow assigning collision polygons to atlas tiles.
func (Expanded) AddSource ¶
func (self Expanded) AddSource(source TileSetSource.Instance, atlas_source_id_override int) int
Adds a [TileSetSource] to the TileSet. If [param atlas_source_id_override] is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated. The function returns the added source ID or -1 if the source could not be added. [b]Warning:[/b] A source cannot belong to two TileSets at the same time. If the added source was attached to another [TileSet], it will be removed from that one.
func (Expanded) AddTerrain ¶
Adds a new terrain to the given terrain set [param terrain_set] at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
func (Expanded) AddTerrainSet ¶
Adds a new terrain set at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
func (Expanded) GetPattern ¶
func (self Expanded) GetPattern(index int) TileMapPattern.Instance
Returns the [TileMapPattern] at the given [param index].
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
A TileSet is a library of tiles for a [TileMapLayer]. A TileSet handles a list of [TileSetSource], each of them storing a set of tiles. Tiles can either be from a [TileSetAtlasSource], which renders tiles out of a texture with support for physics, navigation, etc., or from a [TileSetScenesCollectionSource], which exposes scene-based tiles. Tiles are referenced by using three IDs: their source ID, their atlas coordinates ID, and their alternative tile ID. A TileSet can be configured so that its tiles expose more or fewer properties. To do so, the TileSet resources use property layers, which you can add or remove depending on your needs. For example, adding a physics layer allows giving collision shapes to your tiles. Each layer has dedicated properties (physics layer and mask), so you may add several TileSet physics layers for each type of collision you need. See the functions to add new layers for more information.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AddCustomDataLayer ¶
func (self Instance) AddCustomDataLayer()
Adds a custom data layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Custom data layers allow assigning custom properties to atlas tiles.
func (Instance) AddNavigationLayer ¶
func (self Instance) AddNavigationLayer()
Adds a navigation layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Navigation layers allow assigning a navigable area to atlas tiles.
func (Instance) AddOcclusionLayer ¶
func (self Instance) AddOcclusionLayer()
Adds an occlusion layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Occlusion layers allow assigning occlusion polygons to atlas tiles.
func (Instance) AddPattern ¶
func (self Instance) AddPattern(pattern TileMapPattern.Instance) int
Adds a [TileMapPattern] to be stored in the TileSet resource. If provided, insert it at the given [param index].
func (Instance) AddPhysicsLayer ¶
func (self Instance) AddPhysicsLayer()
Adds a physics layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Physics layers allow assigning collision polygons to atlas tiles.
func (Instance) AddSource ¶
func (self Instance) AddSource(source TileSetSource.Instance) int
Adds a [TileSetSource] to the TileSet. If [param atlas_source_id_override] is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated. The function returns the added source ID or -1 if the source could not be added. [b]Warning:[/b] A source cannot belong to two TileSets at the same time. If the added source was attached to another [TileSet], it will be removed from that one.
func (Instance) AddTerrain ¶
Adds a new terrain to the given terrain set [param terrain_set] at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
func (Instance) AddTerrainSet ¶
func (self Instance) AddTerrainSet()
Adds a new terrain set at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) CleanupInvalidTileProxies ¶
func (self Instance) CleanupInvalidTileProxies()
Clears tile proxies pointing to invalid tiles.
func (Instance) GetAlternativeLevelTileProxy ¶
func (self Instance) GetAlternativeLevelTileProxy(source_from int, coords_from Vector2i.XY, alternative_from int) []any
Returns the alternative-level proxy for the given identifiers. The returned array contains the three proxie's target identifiers (source ID, atlas coords ID and alternative tile ID). If the TileSet has no proxy for the given identifiers, returns an empty Array.
func (Instance) GetCoordsLevelTileProxy ¶
Returns the coordinate-level proxy for the given identifiers. The returned array contains the two target identifiers of the proxy (source ID and atlas coordinates ID). If the TileSet has no proxy for the given identifiers, returns an empty Array.
func (Instance) GetCustomDataLayerByName ¶
Returns the index of the custom data layer identified by the given name.
func (Instance) GetCustomDataLayerName ¶
Returns the name of the custom data layer identified by the given index.
func (Instance) GetCustomDataLayerType ¶
Returns the type of the custom data layer identified by the given index.
func (Instance) GetCustomDataLayersCount ¶
Returns the custom data layers count.
func (Instance) GetNavigationLayerLayerValue ¶
Returns whether or not the specified navigation layer of the TileSet navigation data layer identified by the given [param layer_index] is enabled, given a navigation_layers [param layer_number] between 1 and 32.
func (Instance) GetNavigationLayerLayers ¶
Returns the navigation layers (as in the Navigation server) of the given TileSet navigation layer.
func (Instance) GetNavigationLayersCount ¶
Returns the navigation layers count.
func (Instance) GetNextSourceId ¶
Returns a new unused source ID. This generated ID is the same that a call to [method add_source] would return.
func (Instance) GetOcclusionLayerLightMask ¶
Returns the light mask of the occlusion layer.
func (Instance) GetOcclusionLayerSdfCollision ¶
Returns if the occluders from this layer use [code]sdf_collision[/code].
func (Instance) GetOcclusionLayersCount ¶
Returns the occlusion layers count.
func (Instance) GetPattern ¶
func (self Instance) GetPattern() TileMapPattern.Instance
Returns the [TileMapPattern] at the given [param index].
func (Instance) GetPatternsCount ¶
Returns the number of [TileMapPattern] this tile set handles.
func (Instance) GetPhysicsLayerCollisionLayer ¶
Returns the collision layer (as in the physics server) bodies on the given TileSet's physics layer are in.
func (Instance) GetPhysicsLayerCollisionMask ¶
Returns the collision mask of bodies on the given TileSet's physics layer.
func (Instance) GetPhysicsLayerCollisionPriority ¶
Returns the collision priority of bodies on the given TileSet's physics layer.
func (Instance) GetPhysicsLayerPhysicsMaterial ¶
func (self Instance) GetPhysicsLayerPhysicsMaterial(layer_index int) PhysicsMaterial.Instance
Returns the physics material of bodies on the given TileSet's physics layer.
func (Instance) GetPhysicsLayersCount ¶
Returns the physics layers count.
func (Instance) GetSource ¶
func (self Instance) GetSource(source_id int) TileSetSource.Instance
Returns the [TileSetSource] with ID [param source_id].
func (Instance) GetSourceCount ¶
Returns the number of [TileSetSource] in this TileSet.
func (Instance) GetSourceId ¶
Returns the source ID for source with index [param index].
func (Instance) GetSourceLevelTileProxy ¶
Returns the source-level proxy for the given source identifier. If the TileSet has no proxy for the given identifier, returns -1.
func (Instance) GetTerrainColor ¶
Returns a terrain's color.
func (Instance) GetTerrainName ¶
Returns a terrain's name.
func (Instance) GetTerrainSetMode ¶
func (self Instance) GetTerrainSetMode(terrain_set int) TerrainMode
Returns a terrain set mode.
func (Instance) GetTerrainSetsCount ¶
Returns the terrain sets count.
func (Instance) GetTerrainsCount ¶
Returns the number of terrains in the given terrain set.
func (Instance) HasAlternativeLevelTileProxy ¶
func (self Instance) HasAlternativeLevelTileProxy(source_from int, coords_from Vector2i.XY, alternative_from int) bool
Returns if there is an alternative-level proxy for the given identifiers.
func (Instance) HasCoordsLevelTileProxy ¶
Returns if there is a coodinates-level proxy for the given identifiers.
func (Instance) HasCustomDataLayerByName ¶
Returns if there is a custom data layer named [param layer_name].
func (Instance) HasSourceLevelTileProxy ¶
Returns if there is a source-level proxy for the given source ID.
func (Instance) MapTileProxy ¶
func (self Instance) MapTileProxy(source_from int, coords_from Vector2i.XY, alternative_from int) []any
According to the configured proxies, maps the provided identifiers to a new set of identifiers. The source ID, atlas coordinates ID and alternative tile ID are returned as a 3 elements Array. This function first look for matching alternative-level proxies, then coordinates-level proxies, then source-level proxies. If no proxy corresponding to provided identifiers are found, returns the same values the ones used as arguments.
func (Instance) MoveCustomDataLayer ¶
Moves the custom data layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
func (Instance) MoveNavigationLayer ¶
Moves the navigation layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
func (Instance) MoveOcclusionLayer ¶
Moves the occlusion layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
func (Instance) MovePhysicsLayer ¶
Moves the physics layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
func (Instance) MoveTerrain ¶
Moves the terrain at index [param terrain_index] for terrain set [param terrain_set] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
func (Instance) MoveTerrainSet ¶
Moves the terrain set at index [param terrain_set] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
func (Instance) RemoveAlternativeLevelTileProxy ¶
func (self Instance) RemoveAlternativeLevelTileProxy(source_from int, coords_from Vector2i.XY, alternative_from int)
Removes an alternative-level proxy for the given identifiers.
func (Instance) RemoveCoordsLevelTileProxy ¶
Removes a coordinates-level proxy for the given identifiers.
func (Instance) RemoveCustomDataLayer ¶
Removes the custom data layer at index [param layer_index]. Also updates the atlas tiles accordingly.
func (Instance) RemoveNavigationLayer ¶
Removes the navigation layer at index [param layer_index]. Also updates the atlas tiles accordingly.
func (Instance) RemoveOcclusionLayer ¶
Removes the occlusion layer at index [param layer_index]. Also updates the atlas tiles accordingly.
func (Instance) RemovePattern ¶
Remove the [TileMapPattern] at the given index.
func (Instance) RemovePhysicsLayer ¶
Removes the physics layer at index [param layer_index]. Also updates the atlas tiles accordingly.
func (Instance) RemoveSource ¶
Removes the source with the given source ID.
func (Instance) RemoveSourceLevelTileProxy ¶
Removes a source-level tile proxy.
func (Instance) RemoveTerrain ¶
Removes the terrain at index [param terrain_index] in the given terrain set [param terrain_set]. Also updates the atlas tiles accordingly.
func (Instance) RemoveTerrainSet ¶
Removes the terrain set at index [param terrain_set]. Also updates the atlas tiles accordingly.
func (Instance) SetAlternativeLevelTileProxy ¶
func (self Instance) SetAlternativeLevelTileProxy(source_from int, coords_from Vector2i.XY, alternative_from int, source_to int, coords_to Vector2i.XY, alternative_to int)
Create an alternative-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. This can be used to replace a tile in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target tile when one is available. Proxied tiles can be automatically replaced in TileMap nodes using the editor.
func (Instance) SetCoordsLevelTileProxy ¶
func (self Instance) SetCoordsLevelTileProxy(p_source_from int, coords_from Vector2i.XY, source_to int, coords_to Vector2i.XY)
Creates a coordinates-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. The alternative tile ID is kept the same when using coordinates-level proxies. This can be used to replace a tile in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target tile when one is available. Proxied tiles can be automatically replaced in TileMap nodes using the editor.
func (Instance) SetCustomDataLayerName ¶
Sets the name of the custom data layer identified by the given index. Names are identifiers of the layer therefore if the name is already taken it will fail and raise an error.
func (Instance) SetCustomDataLayerType ¶
Sets the type of the custom data layer identified by the given index.
func (Instance) SetNavigationLayerLayerValue ¶
Based on [param value], enables or disables the specified navigation layer of the TileSet navigation data layer identified by the given [param layer_index], given a navigation_layers [param layer_number] between 1 and 32.
func (Instance) SetNavigationLayerLayers ¶
Sets the navigation layers (as in the navigation server) for navigation regions in the given TileSet navigation layer.
func (Instance) SetOcclusionLayerLightMask ¶
Sets the occlusion layer (as in the rendering server) for occluders in the given TileSet occlusion layer.
func (Instance) SetOcclusionLayerSdfCollision ¶
Enables or disables SDF collision for occluders in the given TileSet occlusion layer.
func (Instance) SetPhysicsLayerCollisionLayer ¶
Sets the collision layer (as in the physics server) for bodies in the given TileSet physics layer.
func (Instance) SetPhysicsLayerCollisionMask ¶
Sets the collision mask for bodies in the given TileSet physics layer.
func (Instance) SetPhysicsLayerCollisionPriority ¶
Sets the collision priority for bodies in the given TileSet physics layer.
func (Instance) SetPhysicsLayerPhysicsMaterial ¶
func (self Instance) SetPhysicsLayerPhysicsMaterial(layer_index int, physics_material PhysicsMaterial.Instance)
Sets the physics material for bodies in the given TileSet physics layer.
func (Instance) SetSourceId ¶
Changes a source's ID.
func (Instance) SetSourceLevelTileProxy ¶
Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlas coordinates ID and the alternative tile ID are kept the same when using source-level proxies. This can be used to replace a source in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target source when one is available. Proxied tiles can be automatically replaced in TileMap nodes using the editor.
func (Instance) SetTerrainColor ¶
Sets a terrain's color. This color is used for identifying the different terrains in the TileSet editor.
func (Instance) SetTerrainName ¶
Sets a terrain's name.
func (Instance) SetTerrainSetMode ¶
func (self Instance) SetTerrainSetMode(terrain_set int, mode TerrainMode)
Sets a terrain mode. Each mode determines which bits of a tile shape is used to match the neighboring tiles' terrains.
func (Instance) SetTileLayout ¶
func (self Instance) SetTileLayout(value TileLayout)
func (Instance) SetTileOffsetAxis ¶
func (self Instance) SetTileOffsetAxis(value TileOffsetAxis)
func (Instance) SetTileShape ¶
func (Instance) SetTileSize ¶
func (Instance) SetUvClipping ¶
func (Instance) TileLayout ¶
func (self Instance) TileLayout() TileLayout
func (Instance) TileOffsetAxis ¶
func (self Instance) TileOffsetAxis() TileOffsetAxis
func (Instance) UvClipping ¶
type TerrainMode ¶
type TerrainMode int //gd:TileSet.TerrainMode
const ( /*Requires both corners and side to match with neighboring tiles' terrains.*/ TerrainModeMatchCornersAndSides TerrainMode = 0 /*Requires corners to match with neighboring tiles' terrains.*/ TerrainModeMatchCorners TerrainMode = 1 /*Requires sides to match with neighboring tiles' terrains.*/ TerrainModeMatchSides TerrainMode = 2 )
type TileLayout ¶
type TileLayout int //gd:TileSet.TileLayout
const ( /*Tile coordinates layout where both axis stay consistent with their respective local horizontal and vertical axis.*/ TileLayoutStacked TileLayout = 0 /*Same as [constant TILE_LAYOUT_STACKED], but the first half-offset is negative instead of positive.*/ TileLayoutStackedOffset TileLayout = 1 /*Tile coordinates layout where the horizontal axis stay horizontal, and the vertical one goes down-right.*/ TileLayoutStairsRight TileLayout = 2 /*Tile coordinates layout where the vertical axis stay vertical, and the horizontal one goes down-right.*/ TileLayoutStairsDown TileLayout = 3 /*Tile coordinates layout where the horizontal axis goes up-right, and the vertical one goes down-right.*/ TileLayoutDiamondRight TileLayout = 4 /*Tile coordinates layout where the horizontal axis goes down-right, and the vertical one goes down-left.*/ TileLayoutDiamondDown TileLayout = 5 )
type TileOffsetAxis ¶
type TileOffsetAxis int //gd:TileSet.TileOffsetAxis
const ( /*Horizontal half-offset.*/ TileOffsetAxisHorizontal TileOffsetAxis = 0 /*Vertical half-offset.*/ TileOffsetAxisVertical TileOffsetAxis = 1 )
type TileShape ¶
type TileShape int //gd:TileSet.TileShape
const ( /*Rectangular tile shape.*/ TileShapeSquare TileShape = 0 /*Diamond tile shape (for isometric look). [b]Note:[/b] Isometric [TileSet] works best if [TileMap] and all its layers have Y-sort enabled.*/ TileShapeIsometric TileShape = 1 /*Rectangular tile shape with one row/column out of two offset by half a tile.*/ TileShapeHalfOffsetSquare TileShape = 2 /*Hexagonal tile shape.*/ TileShapeHexagon TileShape = 3 )