scenes

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scene

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

Scene is a set of layers

func FromJSON

func FromJSON(spriteMap sprites.SpriteMap, sceneJSON SceneJSON, parameters map[string]interface{}) (*Scene, error)

FromJSON creates a new scene from JSON

func New

func New(name string) *Scene

New creates a new scene

func (*Scene) Add

func (s *Scene) Add(layer *layers.Layer)

Add adds a layers to the scene

func (*Scene) Draw

func (s *Scene) Draw(scale int)

Draw draws the scene

func (*Scene) GetClip

func (s *Scene) GetClip(layer, clip string, i int) (*clips.Clip, error)

GetClip gets a clip from the scene

func (*Scene) GetLayers

func (s *Scene) GetLayers() map[string]*layers.Layer

GetLayers gets the layers of the scene

func (*Scene) GetName

func (s *Scene) GetName() string

GetName gets the name of the scene

func (*Scene) Update

func (s *Scene) Update(scale int) (err error)

Update updates the scene

type SceneJSON

type SceneJSON struct {
	Name   string
	Layers []layers.LayerJSON
}

SceneJSON 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