Documentation ¶
Index ¶
Constants ¶
View Source
const ( Large = iota Medium Small )
Variables ¶
View Source
var AlienSpaceShip = sprite(spriteSheet, 416, 160, 96, 80)
View Source
var Bullet1 = sprite(spriteSheet, 448, 286, 32, 32)
View Source
var Bullet2 = sprite(spriteSheet, 480, 286, 32, 32)
View Source
var LargeAsteroids = []*ebiten.Image{
sprite(spriteSheet, 0, 0, 160, 160),
sprite(spriteSheet, 160, 0, 160, 160),
sprite(spriteSheet, 320, 0, 160, 160),
}
2x
View Source
var MediumAsteroids = []*ebiten.Image{
sprite(spriteSheet, 0, 160, 80, 96),
sprite(spriteSheet, 96, 160, 80, 96),
sprite(spriteSheet, 192, 160, 80, 96),
}
View Source
var SmallAsteroids = []*ebiten.Image{
sprite(spriteSheet, 0, 254, 64, 64),
sprite(spriteSheet, 64, 254, 64, 64),
sprite(spriteSheet, 128, 254, 64, 64),
}
View Source
var SpaceShip1 = sprite(spriteSheet, 192, 254, 96, 64)
View Source
var SpaceShip2 = sprite(spriteSheet, 288, 254, 96, 64)
Functions ¶
Types ¶
type Sprite ¶
type Sprite struct { Position *geometry.Vector Velocity *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 (*Sprite) MoveForward ¶
Click to show internal directories.
Click to hide internal directories.