systems

package
v0.0.0-...-f7e941e Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlayerFireSystem

func NewPlayerFireSystem(p *gohan.Entity) *playerFireSystem

func NewPlayerMoveSystem

func NewPlayerMoveSystem(player *gohan.Entity, m *MovementSystem) *playerMoveSystem

func SinXMovement

func SinXMovement(vel *kmath.Vec, t uint)

func SinXMovement2

func SinXMovement2(vel *kmath.Vec, t uint)

Types

type CollisionSystem

type CollisionSystem struct {
	Sprite   *component.Sprite
	Position *component.Position
}

func NewCollisionSystem

func NewCollisionSystem() *CollisionSystem

func (*CollisionSystem) Draw

func (cs *CollisionSystem) Draw(_ gohan.Entity, _ *ebiten.Image) error

func (*CollisionSystem) Update

func (cs *CollisionSystem) Update(e gohan.Entity) error

type CreepSpawnSystem

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

func NewCreepSpawnSystem

func NewCreepSpawnSystem() *CreepSpawnSystem

func (*CreepSpawnSystem) Draw

func (css *CreepSpawnSystem) Draw(e gohan.Entity, screen *ebiten.Image) error

func (*CreepSpawnSystem) Update

func (css *CreepSpawnSystem) Update(gohan.Entity) error

type CreepSystem

type CreepSystem struct {
	CreepWeapon *component.Weapon
	Creep       *component.Creep
}

func NewCreepSystem

func NewCreepSystem() *CreepSystem

func (*CreepSystem) Draw

func (cs *CreepSystem) Draw(_ gohan.Entity, _ *ebiten.Image) error

func (*CreepSystem) Update

func (cs *CreepSystem) Update(e gohan.Entity) error

type MovementSystem

type MovementSystem struct {
	Position *component.Position
	Velocity *component.Velocity
	VelFunc  *component.VelocityFunc `gohan:"?"`

	ScreenW, ScreenH float64 `gohan:"-"`
}

func NewMovementSystem

func NewMovementSystem() *MovementSystem

func (*MovementSystem) Draw

func (*MovementSystem) Update

func (m *MovementSystem) Update(e gohan.Entity) error

type RenderMessageSystem

type RenderMessageSystem struct {
	Position *component.Position
	Velocity *component.Velocity
	Weapon   *component.Weapon
	// contains filtered or unexported fields
}

func NewRenderMessageSystem

func NewRenderMessageSystem() *RenderMessageSystem

func (*RenderMessageSystem) Draw

func (s *RenderMessageSystem) Draw(_ gohan.Entity, screen *ebiten.Image) error

func (*RenderMessageSystem) Update

func (s *RenderMessageSystem) Update(_ gohan.Entity) error

type RenderSystem

type RenderSystem struct {
	Position         *component.Position
	Sprite           *component.Sprite
	SpriteAlternator *component.SpriteAlternator `gohan:"?"`

	ScreenW int `gohan:"-"`
	ScreenH int `gohan:"-"`
	// contains filtered or unexported fields
}

func NewRenderSystem

func NewRenderSystem() *RenderSystem

func (*RenderSystem) Draw

func (s *RenderSystem) Draw(e gohan.Entity, screen *ebiten.Image) error

func (*RenderSystem) Update

func (s *RenderSystem) Update(e gohan.Entity) error

type SpawnConfig

type SpawnConfig struct {
	BaseSpawnRate       uint
	SpawnRateVariance   int
	MaxConcurrentCreeps uint
	DifficultyScaling   float64
	WaveSize            uint
}

type SpawnPattern

type SpawnPattern int
const (
	SpawnSingle SpawnPattern = iota
	SpawnLine
	SpawnFormation
	SpawnWave
)

Jump to

Keyboard shortcuts

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