scene

package
v0.0.0-...-8a8a644 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseScene

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

func NewBaseScene

func NewBaseScene() *BaseScene

func (*BaseScene) Draw

func (b *BaseScene) Draw(screen *ebiten.Image)

func (*BaseScene) IsRunning

func (b *BaseScene) IsRunning() bool

func (*BaseScene) Layout

func (b *BaseScene) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int)

func (*BaseScene) SetIsRunning

func (b *BaseScene) SetIsRunning(running bool)

func (*BaseScene) Update

func (b *BaseScene) Update() error

type LoadingScene

type LoadingScene struct {
	BaseScene
	// contains filtered or unexported fields
}

func NewLoadingScene

func NewLoadingScene() *LoadingScene

func (*LoadingScene) Draw

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

func (*LoadingScene) Update

func (l *LoadingScene) Update() error
type MenuScene struct {
	BaseScene
	// contains filtered or unexported fields
}

func NewMenuScene

func NewMenuScene(setExitGame func(), stats PlayerStats) *MenuScene
func (l *MenuScene) Draw(screen *ebiten.Image)
func (m *MenuScene) IsRunning() bool
func (m *MenuScene) SetIsRunning(r bool)
func (l *MenuScene) Update() error

type PlayerStats

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

type Scene

type Scene interface {
	Update() error
	Draw(screen *ebiten.Image)
	Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int)
	IsRunning() bool
	SetIsRunning(running bool)
}

type SceneId

type SceneId string
const (
	LOADING_SCENE SceneId = "game_loading_scene"
	MENU_SCENE    SceneId = "menu_scene"
	GAME_SCENE    SceneId = "game_scene"
	SCORE_SCENE   SceneId = "game_over_scene"
)

type SceneManager

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

func NewSceneManager

func NewSceneManager() *SceneManager

func (*SceneManager) Draw

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

func (*SceneManager) Layout

func (s *SceneManager) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int)

func (*SceneManager) Update

func (s *SceneManager) Update() error

type ScoreScene

type ScoreScene struct {
	BaseScene
	// contains filtered or unexported fields
}

func NewScoreScene

func NewScoreScene(stats PlayerStats) *ScoreScene

func (*ScoreScene) Draw

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

func (*ScoreScene) Update

func (l *ScoreScene) Update() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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