drawing

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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LayerWorldBG is the standard layer value for world background.
	LayerWorldBackground = 0
	// LayerWorldFG is the standard layer value for world foreground.
	LayerWorldForeground = 100
	// LayerWorldOverlay is the standard layer value for world overlay.
	LayerWorldOverlay = 200
	// LayerUIBackground is the standard layer value for UI background.
	LayerUIBackground = 300
	// LayerUIForeground is the standard layer value for UI foreground.
	LayerUIForeground = 400
)

Variables

This section is empty.

Functions

func DebugPrint added in v0.5.0

func DebugPrint(
	screen *ebiten.Image, ids []string, dps []DebugPrintable)

Types

type DebugPrintable added in v0.5.0

type DebugPrintable interface {
	DebugData() *debug.Dataset
}

type Drawable added in v0.5.0

type Drawable interface {
	DrawLayer() int
	DrawSortValue() float64
	Draw(screen *ebiten.Image, cam camera.Camera)
}

type Layer added in v0.5.0

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

func NewLayer added in v0.5.0

func NewLayer(order int) *Layer

NewLayer makes a new layer.

func (*Layer) Add added in v0.5.0

func (l *Layer) Add(id string, d Drawable)

Add adds a drawable with ID.

func (*Layer) Clear added in v0.5.0

func (l *Layer) Clear()

Clear removes all drawables.

func (*Layer) Draw added in v0.5.0

func (l *Layer) Draw(screen *ebiten.Image, cam camera.Camera)

Draw draws the layer drawables in sorted order.

func (*Layer) Order added in v0.5.0

func (l *Layer) Order() int

Order gets the layer order.

func (*Layer) Remove added in v0.5.0

func (l *Layer) Remove(id string) bool

Remove removes the drawable with the given ID. Returns true if removed.

type System

type System interface {
	Add(id string, r interface{})
	Remove(id string)
	Clear()

	Draw(screen *ebiten.Image)
}

System is used to draw all of the game drawable.

func NewSystem added in v0.5.0

func NewSystem(cam camera.Camera) System

NewSystem makes a new overlay drawing system.

Directories

Path Synopsis
Package mock_drawing is a generated GoMock package.
Package mock_drawing is a generated GoMock package.

Jump to

Keyboard shortcuts

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