game

package
v0.0.0-...-a4ad5b5 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gamemain

func Gamemain()

Gamemain ... invoke game

func TestControl

func TestControl(d *TestControlData) func(bool, *Game) bool

Types

type Game

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

	// drawList
	DrawBgList               []func()
	DrawStageList            []func()
	DrawFeList               []func()
	DrawTermFunc             []func()
	ClrDrawStageListOnUpdate bool

	// ebiten
	Screen *ebiten.Image

	// fade image
	FadeImage *ebiten.Image

	// user
	ScreenWidth  int
	ScreenHeight int
	Count        int
	BgImage      *ebiten.Image

	GophersImage  *ebiten.Image
	GophersImage2 *ebiten.Image
	GophersImage3 *ebiten.Image

	MascotImage  *ebiten.Image
	MascotAImage *ebiten.Image
	EbitenImage  *ebiten.Image

	GameOver bool

	ScoreMul        int
	ScoreBase       int
	ScoreClickCount int
	// contains filtered or unexported fields
}

Game ...

func (*Game) AddDrawBg

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

AddDrawBg ... Add Draw Function to DrawBgList

func (*Game) AddDrawFe

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

AddDrawFe ... Add Draw Function to DrawFeList

func (*Game) AddDrawStage

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

AddDrawStage ... Add Draw Function to DrawStageList

func (*Game) AddUpdate

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

AddUpdate ...

func (*Game) ClearAll

func (g *Game) ClearAll()

ClearAll ...

func (*Game) ClrDbgTerm

func (g *Game) ClrDbgTerm()

ClrDbgTerm ...

func (*Game) ClrDrawBg

func (g *Game) ClrDrawBg()

ClrDrawBg ...

func (*Game) ClrDrawFe

func (g *Game) ClrDrawFe()

ClrDrawFe ...

func (*Game) ClrDrawStage

func (g *Game) ClrDrawStage()

ClrDrawStage ...

func (*Game) ClrUpdate

func (g *Game) ClrUpdate()

ClrUpdate ...

func (*Game) DoDraw

func (g *Game) DoDraw()

DoDraw ...

func (*Game) Draw

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

Draw ...

func (*Game) DrawImage

func (g *Game) DrawImage(image *ebiten.Image, x, y, angle, scale float64)

DrawImage ... simple draw image * screen's origin is upper left

func (*Game) Ebiten32_png

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

func (*Game) EbitenP32_png

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

func (*Game) EbitenT32_png

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

func (*Game) Gophers128_png

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

func (*Game) Gophers32_png

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

func (*Game) Gophers64_png

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

func (*Game) Gophers_jpg

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

Gophers_jpg ...

func (*Game) Layout

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

Layout ...

func (*Game) Mascot16_png

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

Mascot16_png ...

func (*Game) Mascot32_png

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

Mascot32_png ...

func (*Game) Mascot64_png

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

Mascot64_png ...

func (*Game) MascotA32_png

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

func (*Game) PlayUpdate

func (g *Game) PlayUpdate()

PlayUpdate ...

func (*Game) SetDbgTerm

func (g *Game) SetDbgTerm(df func())

SetDbgTerm ...

func (*Game) SetDrawBg

func (g *Game) SetDrawBg(handle int, df func())

SetDrawBg ...

func (Game) SetDrawFe

func (g Game) SetDrawFe(handle int, df func())

SetDrawFe ...

func (*Game) SetDrawStage

func (g *Game) SetDrawStage(handle int, df func())

SetDrawStage ...

func (*Game) TermClear

func (g *Game) TermClear()

TermClear ...

func (*Game) TermPrint

func (g *Game) TermPrint(str string)

TermPrint ...

func (*Game) TimeNowMs

func (g *Game) TimeNowMs() int64

TimeNowMs ...

func (*Game) Update

func (g *Game) Update() error

Update ...

type TestControlData

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

Jump to

Keyboard shortcuts

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