game

package
v0.0.0-...-bb3c9bc Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GameTitle  = "Boxes"
	GameWidth  = 320
	GameHeight = 240
)
View Source
const GridSize = 16

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

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

type Field

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

func ParseField

func ParseField(str string) *Field

func (*Field) Draw

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

func (*Field) Update

func (f *Field) Update()

type Game

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

func (*Game) GoToGameScene

func (g *Game) GoToGameScene()

func (*Game) Layout

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

func (*Game) Update

func (g *Game) Update(screen *ebiten.Image) error

type GameScene

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

func (*GameScene) Draw

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

func (*GameScene) Update

func (g *GameScene) Update(sceneManager SceneManager) error

type Grid

type Grid byte
const (
	GridFloor Grid = iota
	GridGoal
	GridWall
)

type Player

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

type Scene

type Scene interface {
	Update(sceneManager SceneManager) error
	Draw(screen *ebiten.Image)
}

type SceneManager

type SceneManager interface {
	GoToGameScene()
}

type TitleScene

type TitleScene struct{}

func (*TitleScene) Draw

func (*TitleScene) Draw(screen *ebiten.Image)

func (*TitleScene) Update

func (*TitleScene) Update(sceneManager SceneManager) error

Jump to

Keyboard shortcuts

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