game

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

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

func NewGame

func NewGame(opt *Options) *Game

func (*Game) Draw

func (g *Game) Draw(screen *ebiten.Image)

func (*Game) GoBack added in v0.4.0

func (g *Game) GoBack()

func (*Game) GoTo

func (g *Game) GoTo(scene Scene)

func (*Game) Layout

func (g *Game) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int)

func (*Game) Update

func (g *Game) Update() error

type MusicManager

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

func NewMusicManager

func NewMusicManager() (*MusicManager, error)

func (*MusicManager) IsPlaying

func (m *MusicManager) IsPlaying() bool

func (*MusicManager) Play

func (m *MusicManager) Play() error

func (*MusicManager) Stop

func (m *MusicManager) Stop() error

func (*MusicManager) Update

func (m *MusicManager) Update()

type Options added in v0.2.0

type Options struct {
	// Show debug overlay with FPS/TPS
	DebugOverlay bool
}

Options for a Game instance

type Scene

type Scene interface {
	Update(game *Game) error
	Draw(screen *ebiten.Image)
}

type SceneGame

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

func NewSceneGame

func NewSceneGame(game *Game, level int64) (*SceneGame, error)

func (*SceneGame) Draw

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

func (*SceneGame) Update

func (s *SceneGame) Update(game *Game) error

type SceneManager

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

func NewSceneManager

func NewSceneManager() *SceneManager

func (*SceneManager) Len

func (s *SceneManager) Len() int

func (*SceneManager) Peek

func (s *SceneManager) Peek() Scene

func (*SceneManager) Pop

func (s *SceneManager) Pop() Scene

func (*SceneManager) Push

func (s *SceneManager) Push(value Scene) Scene

type SceneTitle

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

func NewSceneTitle

func NewSceneTitle(game *Game) (*SceneTitle, error)

func (*SceneTitle) Draw

func (t *SceneTitle) Draw(screen *ebiten.Image)

func (*SceneTitle) Update

func (t *SceneTitle) Update(game *Game) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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