tilegrid

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Unlicense Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RefIDSeparator = " "
)
View Source
const TileGridSchemaStr = `` /* 614-byte string literal not displayed */

Variables

This section is empty.

Functions

func NewBackgroundType

func NewBackgroundType() (resource.Type, error)

Types

type Background

type Background struct {
	*TileGrid
}

type BackgroundType

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

func (*BackgroundType) Load

func (pt *BackgroundType) Load(path string) (resource.Resource, error)

func (*BackgroundType) Name

func (pt *BackgroundType) Name() string

type Row added in v0.2.0

type Row struct {
	Tiles []*Tile
}

type Tile added in v0.3.0

type Tile struct {
	Image          *ebiten.Image
	XScale, YScale float64
}

type TileGrid

type TileGrid struct {
	Origin    topdown.Point[float64] `json:"origin"`
	TileSize  topdown.Size[int]      `json:"tileSize"`
	TileLinks map[string]string      `json:"tileLinks"`
	TileRows  []string               `json:"tileRows"`
	// contains filtered or unexported fields
}

func New

func New(tileSize topdown.Size[int]) *TileGrid

func (*TileGrid) Center

func (tg *TileGrid) Center() topdown.Point[float64]

func (*TileGrid) Draw added in v0.5.0

func (tg *TileGrid) Draw(screen *ebiten.Image, cam camera.Camera)

func (*TileGrid) DrawLayer added in v0.5.0

func (tg *TileGrid) DrawLayer() int

func (*TileGrid) DrawSortValue added in v0.5.0

func (tg *TileGrid) DrawSortValue() float64

func (*TileGrid) Initialize

func (tg *TileGrid) Initialize(mgr resource.Manager) error

func (*TileGrid) MakeRows added in v0.2.0

func (tg *TileGrid) MakeRows(tiles map[string]*Tile) error

func (*TileGrid) VisibleColumns added in v0.2.0

func (tg *TileGrid) VisibleColumns(visible topdown.Rectangle[float64]) (int, int)

func (*TileGrid) VisibleRows added in v0.2.0

func (tg *TileGrid) VisibleRows(visible topdown.Rectangle[float64]) (int, int)

Jump to

Keyboard shortcuts

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