drawing

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LayerBackground = 0
	LayerForeground = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OverlayDrawable

type OverlayDrawable interface {
	OverlayLayer() int
	OverlayDraw(screen *ebiten.Image)
}

OverlayDrawable is the component used in the drawing system to draw on the screen overlay.

type OverlayLayer

type OverlayLayer struct {
	Drawables map[string]OverlayDrawable
}

func NewOverlayLayer

func NewOverlayLayer(order int) *OverlayLayer

func (*OverlayLayer) Clear

func (l *OverlayLayer) Clear()

type OverlaySystem

type OverlaySystem interface {
	System

	DrawOverlay()
	Resize(w, h int)
}

func NewOverlaySystem

func NewOverlaySystem(w, h int) OverlaySystem

type System

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

	Surface() *ebiten.Image
}

type WorldDrawable

type WorldDrawable interface {
	WorldLayer() int
	WorldDraw(world *ebiten.Image, visible topdown.Rectangle[float64])
}

WorldDrawable is the component used in the drawing system to draw on the world surface.

type WorldLayer

type WorldLayer struct {
	Drawables map[string]WorldDrawable
}

func NewWorldLayer

func NewWorldLayer(order int) *WorldLayer

func (*WorldLayer) Clear

func (l *WorldLayer) Clear()

type WorldSystem

type WorldSystem interface {
	System

	DrawWorld(visible topdown.Rectangle[float64])
}

func NewWorldSystem

func NewWorldSystem(w, h int) WorldSystem

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