assets

package
v0.0.0-...-bab7800 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package assets contains font, image & sound resources needed by the game

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assets

type Assets struct {
	ArcadeFont *truetype.Font
	Skin       *ebiten.Image
	Characters *Characters
	Powers     *Powers
	Walls      *Walls
}

func LoadAssets

func LoadAssets() (*Assets, error)

LoadAssets converts the character images(png, jpg, ...) to ebiten image format and loads fonts.

type Characters

type Characters struct {
	Pacman *ebiten.Image
	Ghost1 *ebiten.Image
	Ghost2 *ebiten.Image
	Ghost3 *ebiten.Image
	Ghost4 *ebiten.Image
}

type Powers

type Powers struct {
	Life          *ebiten.Image
	Invincibility *ebiten.Image
}

type Sounds

type Sounds struct {
	Beginning *mp3.Stream
	Chomp     *mp3.Stream
	Death     *mp3.Stream
	EatFlask  *mp3.Stream
	EatGhost  *mp3.Stream
	ExtraPac  *mp3.Stream
}

func LoadSounds

func LoadSounds(ctx *audio.Context) (*Sounds, error)

LoadSounds returns a struct with wav files decoded for the provided audio context.

type Walls

type Walls struct {
	ActiveCorner   *ebiten.Image
	ActiveSide     *ebiten.Image
	InActiveCorner *ebiten.Image
	InActiveSide   *ebiten.Image
}

Directories

Path Synopsis
Package fonts contains variables holding font files.
Package fonts contains variables holding font files.
Package images contains variables holding image files.
Package images contains variables holding image files.
Package sounds contains variables holding sound files.
Package sounds contains variables holding sound files.

Jump to

Keyboard shortcuts

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