tile

package
v0.0.0-...-59843aa Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tile

type Tile struct {
	// contains filtered or unexported fields
}

瓦片

func NewTile

func NewTile(engine *g2d.Engine, width, height int) (tile Tile)

新建

func (*Tile) Draw

func (t *Tile) Draw()

渲染

func (*Tile) GetCount

func (t *Tile) GetCount() (x, y int)

获取数量

func (*Tile) GetOffset

func (t *Tile) GetOffset() (x, y int)

获取偏移

func (*Tile) GetPosition

func (t *Tile) GetPosition(xoff, yoff int) (x, y int)

计算位置

func (*Tile) GetSize

func (t *Tile) GetSize() (width, height int)

获取大小

func (*Tile) GetTile

func (t *Tile) GetTile(x, y int) (xoff, yoff int)

计算瓦片

func (*Tile) SetImageFromData

func (t *Tile) SetImageFromData(x, y int, data []byte) (err error)

设置图片

func (*Tile) SetImageFromImage

func (t *Tile) SetImageFromImage(x, y int, img image.Image)

设置图片

func (*Tile) SetOffset

func (t *Tile) SetOffset(x, y int)

设置偏移

Jump to

Keyboard shortcuts

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