labyrinth

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ScreenHeight = 720
View Source
const ScreenWidth = 1280

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

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

Game is a labyrinth game.

func NewGame

func NewGame(debug *bool) *Game

NewGame returns a new labyrinth game.

func (*Game) Update

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

Update is the Game loop

type KeyboardWrapper

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

func NewKeyboardWrapper

func NewKeyboardWrapper() *KeyboardWrapper

func (*KeyboardWrapper) IsKeyPressed

func (kw *KeyboardWrapper) IsKeyPressed(key ebiten.Key) bool

func (*KeyboardWrapper) KeyPushed

func (kw *KeyboardWrapper) KeyPushed(key ebiten.Key) bool

func (*KeyboardWrapper) LastKeysPushed

func (kw *KeyboardWrapper) LastKeysPushed() []ebiten.Key

LastKeysPushed returns all keys that were pushed useful if you don't know what the user input might be for changing the key bindings. Careful using this looping through a map is slow

func (*KeyboardWrapper) Parse

func (kw *KeyboardWrapper) Parse(id string) (ebiten.Key, error)

Parse converts a string version of a key to a ebiten.Key

func (*KeyboardWrapper) Update

func (kw *KeyboardWrapper) Update()

type Sprite

type Sprite interface {
	CurrentFrame() *ebiten.Image
	Animate()
	Len() int
}

Sprite is an animated slice of ebiten.Image

func NewSprite

func NewSprite(images []*ebiten.Image, miliSecondsBtwFrames int) Sprite

NewSprite returns a new animatable sprite

type Stationary

type Stationary struct {
	Image *ebiten.Image
	// contains filtered or unexported fields
}

func (*Stationary) Draw

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

func (*Stationary) Dst

func (s *Stationary) Dst(i int) (x0, y0, x1, y1 int)

func (*Stationary) Len

func (s *Stationary) Len() int

func (*Stationary) Src

func (s *Stationary) Src(i int) (x0, y0, x1, y1 int)

Jump to

Keyboard shortcuts

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