storyboard

package
v0.0.0-...-50c553c Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Origin = map[string]bmath.Vector2d{
	"0":       bmath.NewVec2d(-1, -1),
	"TopLeft": bmath.NewVec2d(-1, -1),

	"1":      bmath.NewVec2d(0, 0),
	"Centre": bmath.NewVec2d(0, 0),

	"2":          bmath.NewVec2d(-1, 0),
	"CentreLeft": bmath.NewVec2d(-1, 0),

	"3":        bmath.NewVec2d(1, -1),
	"TopRight": bmath.NewVec2d(1, -1),

	"4":            bmath.NewVec2d(0, 1),
	"BottomCentre": bmath.NewVec2d(0, 1),

	"5":         bmath.NewVec2d(0, -1),
	"TopCentre": bmath.NewVec2d(0, -1),

	"7":           bmath.NewVec2d(1, 0),
	"CentreRight": bmath.NewVec2d(1, 0),

	"8":          bmath.NewVec2d(-1, 1),
	"BottomLeft": bmath.NewVec2d(-1, 1),

	"9":           bmath.NewVec2d(1, 1),
	"BottomRight": bmath.NewVec2d(1, 1),
}

Functions

This section is empty.

Types

type Command

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

func NewCommand

func NewCommand(data []string) *Command

func (*Command) Apply

func (command *Command) Apply(obj Object)

func (*Command) Init

func (command *Command) Init(obj Object)

func (*Command) Update

func (command *Command) Update(time int64)

type Loop

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

func NewLoop

func NewLoop(data []string, object Object) *Loop

func (*Loop) Add

func (loop *Loop) Add(command *Command)

func (*Loop) Update

func (loop *Loop) Update(time int64)

type Object

type Object interface {
	Update(time int64)
	Draw(time int64, batch *render.SpriteBatch)
	GetLoad() float64
	GetStartTime() int64
	GetEndTime() int64
	GetZIndex() int64

	GetPosition() bmath.Vector2d
	SetPosition(vec bmath.Vector2d)

	GetScale() bmath.Vector2d
	SetScale(vec bmath.Vector2d)

	GetRotation() float64
	SetRotation(rad float64)

	GetColor() mgl32.Vec3
	SetColor(color mgl32.Vec3)

	GetAlpha() float64
	SetAlpha(alpha float64)

	SetHFlip(on bool)
	SetVFlip(on bool)

	SetAdditive(on bool)
}

type Sprite

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

func NewSprite

func NewSprite(texture []*texture.TextureRegion, frameDelay float64, loopForever bool, zIndex int64, position bmath.Vector2d, origin bmath.Vector2d, subCommands []string) *Sprite

func (*Sprite) Draw

func (sprite *Sprite) Draw(time int64, batch *render.SpriteBatch)

func (*Sprite) GetAlpha

func (sprite *Sprite) GetAlpha() float64

func (*Sprite) GetColor

func (sprite *Sprite) GetColor() mgl32.Vec3

func (*Sprite) GetEndTime

func (sprite *Sprite) GetEndTime() int64

func (*Sprite) GetLoad

func (sprite *Sprite) GetLoad() float64

func (*Sprite) GetPosition

func (sprite *Sprite) GetPosition() bmath.Vector2d

func (*Sprite) GetRotation

func (sprite *Sprite) GetRotation() float64

func (*Sprite) GetScale

func (sprite *Sprite) GetScale() bmath.Vector2d

func (*Sprite) GetStartTime

func (sprite *Sprite) GetStartTime() int64

func (*Sprite) GetZIndex

func (sprite *Sprite) GetZIndex() int64

func (*Sprite) SetAdditive

func (sprite *Sprite) SetAdditive(on bool)

func (*Sprite) SetAlpha

func (sprite *Sprite) SetAlpha(alpha float64)

func (*Sprite) SetColor

func (sprite *Sprite) SetColor(color mgl32.Vec3)

func (*Sprite) SetHFlip

func (sprite *Sprite) SetHFlip(on bool)

func (*Sprite) SetPosition

func (sprite *Sprite) SetPosition(vec bmath.Vector2d)

func (*Sprite) SetRotation

func (sprite *Sprite) SetRotation(rad float64)

func (*Sprite) SetScale

func (sprite *Sprite) SetScale(vec bmath.Vector2d)

func (*Sprite) SetVFlip

func (sprite *Sprite) SetVFlip(on bool)

func (*Sprite) Update

func (sprite *Sprite) Update(time int64)

type Storyboard

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

func NewStoryboard

func NewStoryboard(beatMap *beatmap.BeatMap) *Storyboard

func (*Storyboard) BGFileUsed

func (storyboard *Storyboard) BGFileUsed() bool

func (*Storyboard) Draw

func (storyboard *Storyboard) Draw(time int64, batch *render.SpriteBatch)

func (*Storyboard) GetLoad

func (storyboard *Storyboard) GetLoad() float64

func (*Storyboard) GetProcessedSprites

func (storyboard *Storyboard) GetProcessedSprites() int

func (*Storyboard) GetQueueSprites

func (storyboard *Storyboard) GetQueueSprites() int

func (*Storyboard) GetTotalSprites

func (storyboard *Storyboard) GetTotalSprites() int

func (*Storyboard) IsWideScreen

func (storyboard *Storyboard) IsWideScreen() bool

func (*Storyboard) Update

func (storyboard *Storyboard) Update(time int64)

type StoryboardLayer

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

func NewStoryboardLayer

func NewStoryboardLayer() *StoryboardLayer

func (*StoryboardLayer) Add

func (layer *StoryboardLayer) Add(object Object)

func (*StoryboardLayer) Draw

func (layer *StoryboardLayer) Draw(time int64, batch *render.SpriteBatch)

func (*StoryboardLayer) FinishLoading

func (layer *StoryboardLayer) FinishLoading()

func (*StoryboardLayer) GetLoad

func (layer *StoryboardLayer) GetLoad() (sum float64)

func (*StoryboardLayer) Update

func (layer *StoryboardLayer) Update(time int64)

type Transformations

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

func NewTransformations

func NewTransformations(obj Object) *Transformations

func (*Transformations) Add

func (trans *Transformations) Add(command *Command)

func (*Transformations) Finalize

func (trans *Transformations) Finalize()

func (*Transformations) Update

func (trans *Transformations) Update(time int64)

Jump to

Keyboard shortcuts

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