layers

package
v0.0.0-...-38191d5 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layer

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

Layer is a set of layers

func FromJSON

func FromJSON(spriteMap sprites.SpriteMap, layerJSON LayerJSON, parameters map[string]interface{}) (*Layer, error)

FromJSON creates a new layer from JSON

func New

func New(name string) *Layer

New creates a new layer

func (*Layer) Add

func (l *Layer) Add(clip *clips.Clip)

Add adds a layers to the scene

func (*Layer) Draw

func (l *Layer) Draw(screen *ebiten.Image)

Draw draws the layer

func (*Layer) GetClip

func (l *Layer) GetClip(clip string, i int) (*clips.Clip, error)

GetClip gets a clip from the layer

func (*Layer) GetName

func (l *Layer) GetName() string

GetName gets the name of the scene

func (*Layer) Update

func (l *Layer) Update() (err error)

Update updates the layer

type LayerJSON

type LayerJSON struct {
	Name  string
	Clips []clips.ClipJSON
}

LayerJSON is a set of layers in JSON

Jump to

Keyboard shortcuts

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