scene

package
v0.0.0-...-406ed31 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Handlers []Handler
	// contains filtered or unexported fields
}

func NewContainer

func NewContainer(scenes ...Scene) *Container

func (*Container) AddTransition

func (c *Container) AddTransition(from, to Scene) error

func (*Container) Draw

func (c *Container) Draw(screen *ebiten.Image)

func (*Container) End

func (c *Container) End() bool

func (*Container) Reset

func (c *Container) Reset()

func (*Container) Update

func (c *Container) Update() error

type Drawer

type Drawer interface {
	Draw(screen *ebiten.Image)
}

type FadeIn

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

func NewFadeIn

func NewFadeIn(frames int) *FadeIn

func (*FadeIn) Draw

func (f *FadeIn) Draw(target *ebiten.Image)

func (*FadeIn) End

func (f *FadeIn) End() bool

func (*FadeIn) Reset

func (f *FadeIn) Reset()

func (*FadeIn) Update

func (f *FadeIn) Update() error

type FadeOut

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

func NewFadeOut

func NewFadeOut(frames int) *FadeOut

func (*FadeOut) Draw

func (f *FadeOut) Draw(screen *ebiten.Image)

func (*FadeOut) End

func (f *FadeOut) End() bool

func (*FadeOut) Reset

func (f *FadeOut) Reset()

func (*FadeOut) Update

func (f *FadeOut) Update() error

type Handler

type Handler interface {
	Handle(scene Scene)
}

type LongPressResetHandler

type LongPressResetHandler struct {
	Key ebiten.Key

	WaitUntilReset int
	// contains filtered or unexported fields
}

func (*LongPressResetHandler) Handle

func (h *LongPressResetHandler) Handle(scene Scene)

type ResetHandler

type ResetHandler struct {
	Key ebiten.Key
	// contains filtered or unexported fields
}

func (*ResetHandler) Handle

func (h *ResetHandler) Handle(scene Scene)

type Scene

type Scene interface {
	Update() error
	Draw(screen *ebiten.Image)
	End() bool
	Reset()
}

func NewShowImageScene

func NewShowImageScene(frames int, drawer Drawer) Scene

type ScrollText

type ScrollText struct {
	TextKey string
	Current int
	// contains filtered or unexported fields
}

func (*ScrollText) Draw

func (s *ScrollText) Draw(screen *ebiten.Image)

func (*ScrollText) End

func (s *ScrollText) End() bool

func (*ScrollText) Reset

func (s *ScrollText) Reset()

func (*ScrollText) Update

func (s *ScrollText) Update() error

type WaitClick

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

func (*WaitClick) Draw

func (w *WaitClick) Draw(screen *ebiten.Image)

func (*WaitClick) End

func (w *WaitClick) End() bool

func (*WaitClick) Reset

func (w *WaitClick) Reset()

func (*WaitClick) Update

func (w *WaitClick) Update() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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