sprites

package
v0.0.0-...-fb94173 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sprite

type Sprite struct {
	Image *ebiten.Image
	Desc  map[SpriteName]*SpriteDesc
}

func Marco

func Marco() *Sprite

func Weapons

func Weapons() *Sprite

type SpriteDesc

type SpriteDesc struct {
	Speed  int
	Frames int
	Tiles  []*TileDesc
}

type SpriteName

type SpriteName string
const (
	LegsStandingPart SpriteName = "legs-standing-base"
	LegsRunningPart  SpriteName = "legs-running-base"
	BodyStandingPart SpriteName = "body-standing-base"
	BodyShootingPart SpriteName = "body-shooting-base"
	BodyKnifePart    SpriteName = "body-knife-base"
	BodyKnifeUpPart  SpriteName = "body-knife-up"
	BulletBase       SpriteName = "bullet-base"
)

type TileDesc

type TileDesc struct {
	X0    int
	Y0    int
	W     int
	H     int
	Joint [2]int // The point (x,y) in the image that must be places over the joint in another image to build a grouped image. The (0,0) point is the first top-left pixel
}

Jump to

Keyboard shortcuts

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