component

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CreepSnowblower = iota + 1
	CreepSmallRock
	CreepMediumRock
	CreepLargeRock
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Creep

type Creep struct {
	Type   int
	Active bool

	Health     int
	FireAmount int
	FireRate   int // In ticks
	FireTicks  int //Ticks until next action

	Movement      int
	Movements     [][3]float64 // X, Y, pre-delay in ticks
	MovementTicks int          // Ticks until next action

	DamageTicks int

	Rand *rand.Rand
}

type CreepBullet

type CreepBullet struct {
	Invulnerable bool // Invulnerable to hazards
}

type PlayerBullet

type PlayerBullet struct {
}

type Position

type Position struct {
	X, Y float64
	Z    int
}

type Rail

type Rail struct {
}

Rail is a component added to all entities which should move along the rail with the camera.

type Sprite

type Sprite struct {
	Image          *ebiten.Image
	HorizontalFlip bool
	VerticalFlip   bool

	Angle float64

	Overlay            *ebiten.Image
	OverlayX, OverlayY float64 // Overlay offset

	Frame     int
	Frames    []*ebiten.Image
	FrameTime time.Duration
	LastFrame time.Time
	NumFrames int

	DamageTicks int

	OverrideColorScale bool
	ColorScale         float64

	OffsetX, OffsetY float64

	Images []*ebiten.Image
}

type Velocity

type Velocity struct {
	X, Y float64
}

type Weapon

type Weapon struct {
	Equipped bool

	Damage int

	// In ticks
	FireRate int
	NextFire int

	BulletSpeed float64
}

Jump to

Keyboard shortcuts

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