enemies

package
v0.0.0-...-98b1f95 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Enemies           []Enemy
	Particles         []Particle
	Wave              int = 0
	WaveCounter       int = 0 // change later
	Zombie, _, _          = ebitenutil.NewImageFromFile("assets/enemies/zombie.png")
	ParticleImg, _, _     = ebitenutil.NewImageFromFile("assets/particle.png")
)

Functions

func Draw

func Draw(screen *ebiten.Image)

Draws the enemies

func DrawParticles

func DrawParticles(screen *ebiten.Image, Space *resolv.Space)

For drawing the particles when an enemy dies

func NewWave

func NewWave(Space *resolv.Space)

Creates a new wave

func Update

func Update(Space *resolv.Space)

Updates and moves the enemies

Types

type Enemy

type Enemy struct {
	Obj    *resolv.Object
	Type   string
	Speed  float64
	Health int
}

type Particle

type Particle struct {
	Obj   *resolv.Object
	Timer int
}

Jump to

Keyboard shortcuts

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