asset

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TileBeamOrange1 = 256
	TileBeamOrange2 = 257
	TileBeamOrange3 = 258

	TileBeamBlue1 = 259
	TileBeamBlue2 = 260
	TileBeamBlue3 = 261
)

Variables

View Source
var (
	SoundFire    = LoadWAV(audioContext, "sound/fire.wav")
	SoundHit     = LoadWAV(audioContext, "sound/hit.wav")
	SoundExplode = LoadWAV(audioContext, "sound/explode.wav")
	SoundAlarm   = LoadWAV(audioContext, "sound/alarm.wav")
	SoundMusic   = LoadOGG(audioContext, "sound/mechanical_spider_theme.ogg", true)
)
View Source
var ImgBullet = newFilledImage(4, 4, color.RGBA{80, 142, 237, 255})
View Source
var ImgNewspaper = LoadImage("image/newspaper.png")
View Source
var ImgPlayerIdle1 = ImgRobotTileset.SubImage(image.Rect(idleX, idleY, idleX+idleW, idleY+idleH)).(*ebiten.Image)
View Source
var ImgPlayerIdle1Rot90 = rotate90(ImgPlayerIdle1)
View Source
var ImgPlayerIdle2 = ImgRobotTileset.SubImage(image.Rect(idleX+idleW, idleY, idleX+idleW+idleW, idleY+idleH)).(*ebiten.Image)
View Source
var ImgPlayerIdle2Rot90 = rotate90(ImgPlayerIdle2)
View Source
var ImgPlayerIdle3 = ImgRobotTileset.SubImage(image.Rect(idleX+idleW*2, idleY, idleX+idleW*2+idleW, idleY+idleH)).(*ebiten.Image)
View Source
var ImgPlayerIdle3Rot90 = rotate90(ImgPlayerIdle3)
View Source
var ImgPlayerIdle4 = ImgRobotTileset.SubImage(image.Rect(idleX+idleW*3, idleY, idleX+idleW*3+idleW, idleY+idleH)).(*ebiten.Image)
View Source
var ImgPlayerIdle4Rot90 = rotate90(ImgPlayerIdle4)
View Source
var ImgPlayerWalk1 = ImgRobotTileset.SubImage(image.Rect(walkX, walkY, walkX+walkW, walkY+walkH)).(*ebiten.Image)
View Source
var ImgPlayerWalk1Rot90 = rotate90(ImgPlayerWalk1)
View Source
var ImgPlayerWalk2 = ImgRobotTileset.SubImage(image.Rect(walkX+walkW, walkY, walkX+walkW+walkW, walkY+walkH)).(*ebiten.Image)
View Source
var ImgPlayerWalk2Rot90 = rotate90(ImgPlayerWalk2)
View Source
var ImgPlayerWalk3 = ImgRobotTileset.SubImage(image.Rect(walkX+walkW*2, walkY, walkX+walkW*2+walkW, walkY+walkH)).(*ebiten.Image)
View Source
var ImgPlayerWalk3Rot90 = rotate90(ImgPlayerWalk3)
View Source
var ImgPlayerWalk4 = ImgRobotTileset.SubImage(image.Rect(walkX+walkW*3, walkY, walkX+walkW*3+walkW, walkY+walkH)).(*ebiten.Image)
View Source
var ImgPlayerWalk4Rot90 = rotate90(ImgPlayerWalk4)
View Source
var ImgRobotTileset = LoadImage("image/robot-tileset/tileset.png")
View Source
var ImgWhiteSquare = newFilledImage(4, 4, color.White)
View Source
var PlayerIdleFrames = []*ebiten.Image{
	ImgPlayerIdle3,
	ImgPlayerIdle4,
	ImgPlayerIdle1,
	ImgPlayerIdle2,
}
View Source
var PlayerWalkFrames = []*ebiten.Image{
	ImgPlayerWalk1,
	ImgPlayerWalk2,
	ImgPlayerWalk3,
	ImgPlayerWalk4,
}

Functions

func LoadBytes

func LoadBytes(p string) []byte

func LoadImage

func LoadImage(p string) *ebiten.Image

func LoadOGG

func LoadOGG(context *audio.Context, p string, loop bool) *audio.Player

func LoadWAV

func LoadWAV(context *audio.Context, p string) *audio.Player

Types

This section is empty.

Jump to

Keyboard shortcuts

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