component

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScreenWidth  = 440
	ScreenHeight = 280
	TileSize     = 16
	ObjectSize   = TileSize * 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bubble

type Bubble struct {
	Params         Object
	PositiveImage  *ebiten.Image
	NegativeImage  *ebiten.Image
	PositiveSprite *goaseprite.File
	NegativeSprite *goaseprite.File
	Positive       bool
}

func (*Bubble) ChangeCharge

func (b *Bubble) ChangeCharge()

func (*Bubble) DrawOn

func (b *Bubble) DrawOn(screen *ebiten.Image)

func (*Bubble) Update

func (b *Bubble) Update(m *Magnet)

type Cloud

type Cloud struct {
	Params      Object
	CloudImage  *ebiten.Image
	CloudSprite *goaseprite.File
}

func (*Cloud) DrawOn

func (c *Cloud) DrawOn(screen *ebiten.Image)

func (*Cloud) Update

func (c *Cloud) Update()

type Fly

type Fly struct {
	Params    Object
	FlyImage  *ebiten.Image
	FlySprite *goaseprite.File
}

func (*Fly) DrawOn

func (f *Fly) DrawOn(screen *ebiten.Image)

func (*Fly) Update

func (f *Fly) Update()

type Magnet

type Magnet struct {
	Params       Object
	MagnetImage  *ebiten.Image
	MagnetSprite *goaseprite.File
	Positive     bool
}

func (*Magnet) DrawOn

func (m *Magnet) DrawOn(screen *ebiten.Image)

type Object

type Object struct {
	X      float64
	Y      float64
	VX     float64
	VY     float64
	Alive  bool
	Width  int
	Height int
}

func (*Object) CollideWith

func (o *Object) CollideWith(n *Object) bool

func (*Object) Die

func (o *Object) Die()

Jump to

Keyboard shortcuts

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