player

package
v0.0.0-...-28fb5cd Latest Latest
Warning

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

Go to latest
Published: May 8, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const BottomY = 75
View Source
const NumToWin = 5
View Source
const TopY = 450

Variables

This section is empty.

Functions

This section is empty.

Types

type Player

type Player struct {
	Score      int
	Sprite     *sprite.Context
	Shape      shapes.Shape
	PlayerNum  int // player 1 or player 2
	PaddleSize int
	// contains filtered or unexported fields
}

Player state

func New

func New(playerNum int, x, y float32, s *sprite.Context) *Player

func (*Player) Bind

func (p *Player) Bind(program uint32) error

Bind TODO doc

func (Player) Bounds

func (p Player) Bounds() shapes.Shape

func (Player) Draw

func (p Player) Draw()

func (*Player) Handle

func (p *Player) Handle(event events.Event)

func (Player) Pos

func (p Player) Pos() mgl32.Vec3

func (*Player) SetShape

func (p *Player) SetShape()

func (*Player) Update

func (p *Player) Update(dt float32, group *[]entity.Entity)

Update(dt?, group?)

Jump to

Keyboard shortcuts

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