assets

package
v0.0.0-...-22306b7 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RegularText = FontFaceID{
		Font: BackTo1982Font,
		Size: 32,
	}
	BigText = FontFaceID{
		Font: BackTo1982Font,
		Size: 48,
	}
)

Functions

func Font

func Font(id FontID) *opentype.Font

func FontFace

func FontFace(id FontFaceID) font.Face

func Image

func Image(id ImageID) *ebiten.Image

Types

type FontFaceID

type FontFaceID struct {
	Font FontID
	Size float64
}

type FontID

type FontID string
const BackTo1982Font FontID = "font/BACKTO1982.TTF"

type ImageID

type ImageID string
const (
	SnakeHeadSide ImageID = "img/snake-head-side.png"
	SnakeHeadTop  ImageID = "img/snake-head-top.png"
	SnakeBody     ImageID = "img/snake-body.png"
	SnakeBodyTurn ImageID = "img/snake-body-turn.png"
	SnakeTail     ImageID = "img/snake-tail.png"

	Apple ImageID = "img/apple.png"

	Floor ImageID = "img/floor.png"
	Wall  ImageID = "img/wall.png"
)

Jump to

Keyboard shortcuts

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