Documentation
¶
Overview ¶
Package TileSetSource provides methods for working with TileSetSource object instances.
Index ¶
- type Advanced
- type Any
- type Extension
- type ID
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) AsTileSetSource() Instance
- func (self Instance) GetAlternativeTileId(atlas_coords Vector2i.XY, index int) int
- func (self Instance) GetAlternativeTilesCount(atlas_coords Vector2i.XY) int
- func (self Instance) GetTileId(index int) Vector2i.XY
- func (self Instance) GetTilesCount() int
- func (self Instance) HasAlternativeTile(atlas_coords Vector2i.XY, alternative_tile int) bool
- func (self Instance) HasTile(atlas_coords Vector2i.XY) bool
- func (self Instance) ID() ID
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
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 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 ¶
func (*Extension[T]) AsTileSetSource ¶
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 ¶
type Instance [1]gdclass.TileSetSource
Exposes a set of tiles for a [TileSet] resource. Tiles in a source are indexed with two IDs, coordinates ID (of type Vector2i) and an alternative ID (of type int), named according to their use in the [TileSetAtlasSource] class. Depending on the TileSet source type, those IDs might have restrictions on their values, this is why the base [TileSetSource] class only exposes getters for them. You can iterate over all tiles exposed by a TileSetSource by first iterating over coordinates IDs using [method get_tiles_count] and [method get_tile_id], then over alternative IDs using [method get_alternative_tiles_count] and [method get_alternative_tile_id]. [b]Warning:[/b] [TileSetSource] can only be added to one TileSet at the same time. Calling [method TileSet.add_source] on a second [TileSet] will remove the source from the first one.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) AsTileSetSource ¶
func (Instance) GetAlternativeTileId ¶
Returns the alternative ID for the tile with coordinates ID [param atlas_coords] at index [param index].
func (Instance) GetAlternativeTilesCount ¶
Returns the number of alternatives tiles for the coordinates ID [param atlas_coords]. For [TileSetAtlasSource], this always return at least 1, as the base tile with ID 0 is always part of the alternatives list. Returns -1 if there is not tile at the given coords.
func (Instance) GetTilesCount ¶
Returns how many tiles this atlas source defines (not including alternative tiles).
func (Instance) HasAlternativeTile ¶
Returns if the base tile at coordinates [param atlas_coords] has an alternative with ID [param alternative_tile].
func (Instance) HasTile ¶
Returns if this atlas has a tile with coordinates ID [param atlas_coords].