game

package
v0.0.0-...-5353c27 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TopWall = iota
	RightWall
	BottomWall
	LeftWall
	NoWall
)
View Source
const (
	InitialBallSpeed = 10
)

Variables

This section is empty.

Functions

func LoadImage

func LoadImage(resourcesBasePath, path string) *ebiten.Image

Types

type Ball

type Ball struct {
	Radius   int
	Diameter int
	types.Object
}

func (*Ball) Draw

func (b *Ball) Draw()

func (*Ball) Move

func (b *Ball) Move()

type Game

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

func NewGame

func NewGame(screen *ebiten.Image, basePath string) Game

func (*Game) Draw

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

func (*Game) StartGame

func (g *Game) StartGame(side string)

func (*Game) Tick

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

type Paddle

type Paddle struct {
	Width, Height float64
	Color         color.Color
	types.Object
}

func NewPaddle

func NewPaddle(width, height int, pos types.Vector, color color.Color, canvas *types.Canvas) Paddle

type Player

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

func NewPlayer

func NewPlayer(side string, width, height int, pos types.Vector, color color.Color, canvas *types.Canvas) Player

func (*Player) Draw

func (p *Player) Draw()

func (*Player) Move

func (p *Player) Move(offset types.Vector)

type Wall

type Wall int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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