game

package
v0.0.0-...-a41d8bb Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Original Copyright 2014 Hajime Hoshi

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gamemain

func Gamemain()

Gamemain ... invoke game

func MainControl

func MainControl() func(bool, *Game) bool

MainControl ... main flow

Types

type Game

type Game struct {
	UpdateList []func(bool, *Game) bool // UpdateList ... contains statego controllers

	// drawList
	DrawBgList    []func()
	DrawStageList []func()
	DrawFeList    []func()

	// ebiten
	Screen *ebiten.Image

	// user
	ScreenWidth  int
	ScreenHeight int
	Count        int

	GophersImage *ebiten.Image
}

func (*Game) AddDrawBg

func (g *Game) AddDrawBg(df func())

func (*Game) AddDrawFe

func (g *Game) AddDrawFe(df func())

func (*Game) AddDrawStage

func (g *Game) AddDrawStage(df func())

func (*Game) AddUpdate

func (g *Game) AddUpdate(cf func(bool, *Game) bool) int

func (*Game) DoDraw

func (g *Game) DoDraw()

func (*Game) Draw

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

func (*Game) Gophers_jpg

func (g *Game) Gophers_jpg() []byte

func (*Game) Layout

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

func (*Game) PlayUpdate

func (g *Game) PlayUpdate()

func (*Game) TimeNowMs

func (g *Game) TimeNowMs() int64

func (*Game) Update

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

Jump to

Keyboard shortcuts

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