balloon

package
v0.0.0-...-93e07d4 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Animation

type Animation struct {
	Running   bool
	Complete  bool
	Interval  float32
	StartTime time.Time
	Texture   *sdl.Texture
}

type AudioState

type AudioState struct {
	DeviceID       sdl.AudioDeviceID
	AudioSPec      sdl.AudioSpec
	ExplosionBytes []byte
}

type Balloon

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

func NewBalloon

func NewBalloon(t *sdl.Texture, pos, velocity vector.Vector, explosionAnimation *Animation) *Balloon

func UpdateBalloons

func UpdateBalloons(balloons []*Balloon, elapsedTime float32,
	current, previous MouseState, audioState *AudioState, w, h, d int) []*Balloon

func (*Balloon) Circle

func (b *Balloon) Circle() (x, y, r float32)

func (*Balloon) Draw

func (b *Balloon) Draw(renderer *sdl.Renderer)

func (*Balloon) Scale

func (b *Balloon) Scale() float32

type MouseState

type MouseState struct {
	LeftButton, RightButton bool
	X, Y                    int
}

func GetMouseState

func GetMouseState() MouseState

type Slice

type Slice []*Balloon

func (Slice) Len

func (bs Slice) Len() int

func (Slice) Less

func (bs Slice) Less(i, j int) bool

func (Slice) Swap

func (bs Slice) Swap(i, j int)

Jump to

Keyboard shortcuts

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