states

package
v0.0.0-...-ecfa503 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameState

type GameState int
const (
	Menu    GameState = iota // Menu state of the game
	Playing                  // Gameplay state
	Pause
	GameOver
)

func (GameState) String

func (s GameState) String() string
type MenuState struct {
	// contains filtered or unexported fields
}

func NewMenuState

func NewMenuState(dm *dependencies.DependencyManager) *MenuState

NewMenuState initializes a new MenuState.

func (m *MenuState) Draw(screen *ebiten.Image)

Draw renders the menu to the screen.

func (m *MenuState) Update() (int, bool)

Update handles input and state updates for the menu.

type PausedState

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

func (*PausedState) Draw

func (p *PausedState) Draw(screen *ebiten.Image)

func (*PausedState) Update

func (p *PausedState) Update() bool

type PlayingState

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

func NewPlayingState

func NewPlayingState(dm *dependencies.DependencyManager, players int) *PlayingState

func (*PlayingState) Draw

func (p *PlayingState) Draw(screen *ebiten.Image)

func (*PlayingState) Update

func (p *PlayingState) Update() bool

Jump to

Keyboard shortcuts

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