components

package
v0.0.0-...-9927e17 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

type Button struct {
	Hovered    bool
	Text       string
	Bounds     maths.Bounds
	Pressed    bool
	Name       string
	Color      color.Color
	HoverColor color.Color
}

type Direction

type Direction struct {
	Dir maths.Vector2
}

type Renderable

type Renderable struct {
	Image *ebiten.Image
}

type TiledMap

type TiledMap struct {
	Width, Height   int
	TileW, TileH    int
	Tiles           []data.Tile
	BackgroundColor color.RGBA
	TempImage       *ebiten.Image
	Won             bool
}

func NewTiledMap

func NewTiledMap(imgFilename, mapFilename, tilesetFilename string) (*TiledMap, map[string]data.Property, error)

func (TiledMap) CanGo

func (m TiledMap) CanGo(x, y int) bool

func (TiledMap) GetLastTileInDir

func (m TiledMap) GetLastTileInDir(x, y int, dir maths.Vector2) (int, int, error)

func (*TiledMap) GetTile

func (m *TiledMap) GetTile(x, y int) (*data.Tile, error)

func (*TiledMap) HasWon

func (m *TiledMap) HasWon(x, y int) bool

func (TiledMap) MapPosFromScreenPos

func (m TiledMap) MapPosFromScreenPos(x, y int) (int, int)

func (TiledMap) ScreenPosFromMapPos

func (m TiledMap) ScreenPosFromMapPos(x, y int) (float32, float32)

type Transform

type Transform struct {
	Pos    maths.Vector2
	Scale  maths.Vector2
	Rotate float64
	Anchor maths.Vector2
}

func (Transform) GetDrawOptions

func (t Transform) GetDrawOptions(w, h float64) *ebiten.DrawImageOptions

Jump to

Keyboard shortcuts

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