game

package
v0.0.0-...-48559a4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2015 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MOVING_UP = iota
	MOVING_DOWN
	MOVING_STOP
)

Variables

This section is empty.

Functions

func NewPongoGame

func NewPongoGame(width, height int) fwk.Game

Types

type Arena

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

the arena has two bars

func NewArena

func NewArena(parent *fwk.Node, name string, ringsize float32, wallwidth float32, color fwk.Color) *Arena

func (*Arena) GetBottomBoundingVolume

func (a *Arena) GetBottomBoundingVolume() fwk.BoundingVolume

func (*Arena) GetBoundingVolumes

func (a *Arena) GetBoundingVolumes() []fwk.BoundingVolume

func (*Arena) GetName

func (a *Arena) GetName() string

func (*Arena) GetTopBoundingVolume

func (a *Arena) GetTopBoundingVolume() fwk.BoundingVolume

type Ball

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

func NewBall

func NewBall(parent *fwk.Node, name string, position fwk.Vector, color fwk.Color, speed float32) *Ball

func (*Ball) GetBoundingVolumes

func (b *Ball) GetBoundingVolumes() []fwk.BoundingVolume

func (*Ball) GetName

func (b *Ball) GetName() string

func (*Ball) HandleCollision

func (b *Ball) HandleCollision(x, y int)

func (*Ball) Move

func (b *Ball) Move(duration time.Duration)

type Pad

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

func NewPad

func NewPad(parent *fwk.Node, name string, position fwk.Vector, color fwk.Color, speed float32) *Pad

func (*Pad) GetBottom

func (p *Pad) GetBottom() gl.Float

func (*Pad) GetBoundingVolumes

func (p *Pad) GetBoundingVolumes() []fwk.BoundingVolume

func (*Pad) GetDirection

func (p *Pad) GetDirection() int

func (*Pad) GetName

func (n *Pad) GetName() string

func (*Pad) GetTop

func (p *Pad) GetTop() gl.Float

func (*Pad) IsDirectionLocked

func (p *Pad) IsDirectionLocked() bool

func (*Pad) IsDirectionLockedOn

func (p *Pad) IsDirectionLockedOn(dir int) bool

func (*Pad) IsOver

func (n *Pad) IsOver(p fwk.Vector) bool

func (*Pad) IsUnder

func (n *Pad) IsUnder(p fwk.Vector) bool

func (*Pad) LockDirection

func (p *Pad) LockDirection(dir int)

func (*Pad) Move

func (p *Pad) Move(duration time.Duration)

func (*Pad) Rotate

func (p *Pad) Rotate(deg float32, up fwk.Vector)

func (*Pad) SetDirection

func (p *Pad) SetDirection(dir int)

func (*Pad) UnLockDirection

func (p *Pad) UnLockDirection()

Jump to

Keyboard shortcuts

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