rendering

package
v0.0.0-...-9c16532 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Camera

type Camera interface {
	Position() pixel.Vec
	Health() int
}

type InputHandler

type InputHandler interface {
	Handle(Inputs)
}

type InputHandlerFunc

type InputHandlerFunc func(Inputs)

func (InputHandlerFunc) Handle

func (fn InputHandlerFunc) Handle(i Inputs)

type Inputs

type Inputs struct {
	Left, Right, Thrust, Shoot bool
}

type Renderable

type Renderable interface {
	Draw(canvas *pixelgl.Canvas, imd *imdraw.IMDraw)
}

type System

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

func New

func New(win *pixelgl.Window, handler InputHandler) *System

func (*System) Add

func (s *System) Add(entity entity.ID, renderable Renderable)

func (*System) Remove

func (s *System) Remove(entity entity.ID)

func (*System) SetCamera

func (s *System) SetCamera(camera Camera)

func (*System) Update

func (s *System) Update(delta float64)

type Target

type Target interface {
}

Jump to

Keyboard shortcuts

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