TileMapPattern

package
v0.0.0-...-c858641 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

This resource holds a set of cells to help bulk manipulations of graphics.gd/classdb/TileMap.

A pattern always start at the (0,0) coordinates and cannot have cells with negative coordinates.

Index

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 Any

type Any interface {
	gd.IsClass
	AsTileMapPattern() Instance
}

type Expanded

type Expanded [1]gdclass.TileMapPattern

func (Expanded) SetCell

func (self Expanded) SetCell(coords Vector2i.XY, source_id int, atlas_coords Vector2i.XY, alternative_tile int)

Sets the tile identifiers for the cell at coordinates 'coords'. See graphics.gd/classdb/TileMap.Instance.SetCell.

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

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]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

func (*Extension[T]) AsResource

func (self *Extension[T]) AsResource() Resource.Instance

func (*Extension[T]) AsTileMapPattern

func (self *Extension[T]) AsTileMapPattern() Instance

type ID

type ID Object.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.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.TileMapPattern

Instance of the class with convieniently typed arguments and results.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) AsTileMapPattern

func (self Instance) AsTileMapPattern() Instance

func (Instance) GetCellAlternativeTile

func (self Instance) GetCellAlternativeTile(coords Vector2i.XY) int

Returns the tile alternative ID of the cell at 'coords'.

func (Instance) GetCellAtlasCoords

func (self Instance) GetCellAtlasCoords(coords Vector2i.XY) Vector2i.XY

Returns the tile atlas coordinates ID of the cell at 'coords'.

func (Instance) GetCellSourceId

func (self Instance) GetCellSourceId(coords Vector2i.XY) int

Returns the tile source ID of the cell at 'coords'.

func (Instance) GetSize

func (self Instance) GetSize() Vector2i.XY

Returns the size, in cells, of the pattern.

func (Instance) GetUsedCells

func (self Instance) GetUsedCells() []Vector2i.XY

Returns the list of used cell coordinates in the pattern.

func (Instance) HasCell

func (self Instance) HasCell(coords Vector2i.XY) bool

Returns whether the pattern has a tile at the given coordinates.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) IsEmpty

func (self Instance) IsEmpty() bool

Returns whether the pattern is empty or not.

func (Instance) RemoveCell

func (self Instance) RemoveCell(coords Vector2i.XY, update_size bool)

Remove the cell at the given coordinates.

func (Instance) SetCell

func (self Instance) SetCell(coords Vector2i.XY)

Sets the tile identifiers for the cell at coordinates 'coords'. See graphics.gd/classdb/TileMap.Instance.SetCell.

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetSize

func (self Instance) SetSize(size Vector2i.XY)

Sets the size of the pattern.

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL