engine

package
v0.99.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawSpriteOnCollider

func DrawSpriteOnCollider(screen *ebiten.Image, icon *render.AnimatedIcon, transform *components.Transform, collider *components.Collider)

Types

type Camera

type Camera struct {
	X, Y float64
	Zoom float64
	// contains filtered or unexported fields
}

func NewCamera

func NewCamera() *Camera

func (*Camera) Apply

func (c *Camera) Apply(screen *ebiten.Image, draw func(*ebiten.Image))

type Entity

type Entity struct {
	Transform *components.Transform
	Velocity  *components.Velocity
	Sprite    *components.Sprite
	Collider  *components.Collider

	Layer int
}

func (*Entity) CheckCollisionsWithList

func (e *Entity) CheckCollisionsWithList(others []*Entity, signalName string)

func (*Entity) Destroy

func (e *Entity) Destroy()

func (*Entity) Draw

func (e *Entity) Draw(s *ebiten.Image)

func (*Entity) IsParallelSafe

func (e *Entity) IsParallelSafe() bool

func (*Entity) Update

func (e *Entity) Update(dt time.Duration)

type Input

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

func NewInput

func NewInput() *Input

func (*Input) JustPressed

func (in *Input) JustPressed(key ebiten.Key) bool

func (*Input) Update

func (in *Input) Update()

type SpatialGrid

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

func NewSpatialGrid

func NewSpatialGrid(cellSize float64) *SpatialGrid

func (*SpatialGrid) Clear

func (g *SpatialGrid) Clear()

func (*SpatialGrid) Insert

func (g *SpatialGrid) Insert(e *Entity)

func (*SpatialGrid) Query

func (g *SpatialGrid) Query(e *Entity) []*Entity

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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