game

package
v0.0.0-...-bdb03cc Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Draw

func Draw()

func New

func New()

func Update

func Update(dt float32)

Types

type Asteroid

type Asteroid struct {
	*Sprite
	// contains filtered or unexported fields
}

func (*Asteroid) Destroy

func (asteroid *Asteroid) Destroy(force bool)

func (*Asteroid) Update

func (asteroid *Asteroid) Update(dt float32)

type Bullet

type Bullet struct {
	*Sprite
}

func (*Bullet) Destroy

func (bullet *Bullet) Destroy(force bool)

func (*Bullet) Update

func (bullet *Bullet) Update(dt float32)

type Explosion

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

func (*Explosion) Destroy

func (explosion *Explosion) Destroy(force bool)

func (*Explosion) Draw

func (explosion *Explosion) Draw()

func (*Explosion) Update

func (explosion *Explosion) Update(dt float32)

type GameObject

type GameObject interface {
	Update(dt float32)
	Draw()
	Destroy(force bool)
}

type Player

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

func (*Player) Destroy

func (player *Player) Destroy(force bool)

func (*Player) Draw

func (player *Player) Draw()

func (*Player) Update

func (player *Player) Update(dt float32)

type Sprite

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

func NewSprite

func NewSprite(collidable phys.Collidable, name string, x, y, scale float32, points []float32, wraps bool) *Sprite

func (*Sprite) Destroy

func (sprite *Sprite) Destroy()

func (*Sprite) Draw

func (sprite *Sprite) Draw()

func (*Sprite) GetPoints

func (sprite *Sprite) GetPoints() []float32

func (*Sprite) UpdateMovement

func (sprite *Sprite) UpdateMovement(delta float32) []*phys.Body

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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