sprites

package
v0.0.0-...-0e8056b Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Boid = sprite(spriteSheet, 96, 127, 48, 32)

Functions

func Centre

func Centre(sprite *ebiten.Image) geometry.Vector

func Size

func Size(sprite *ebiten.Image) *geometry.Dimension

Types

type Sprite

type Sprite struct {
	Position     *geometry.Vector
	Velocity     *geometry.Vector
	Acceleration *geometry.Vector
	Orientation  float64
	Direction    float64
	Speed        float64
	Rotation     float64
	Centre       *geometry.Vector
	Size         *geometry.Dimension
	Image        *ebiten.Image

	ColorModel  colorm.ColorM
	DrawOptions *colorm.DrawImageOptions
	// contains filtered or unexported fields
}

func NewSprite

func NewSprite(screenBounds *geometry.Dimension, image *ebiten.Image, wraparound bool) *Sprite

func (*Sprite) Draw

func (s *Sprite) Draw(screen *ebiten.Image)

func (*Sprite) MoveForward

func (s *Sprite) MoveForward(acceleration, maxSpeed float64)

func (*Sprite) Reset

func (s *Sprite) Reset()

func (*Sprite) Update

func (s *Sprite) Update() error

Jump to

Keyboard shortcuts

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