asset

package
v0.0.0-...-7f92c57 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package asset provides interfaces for Asset and Source

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset interface {
	fmt.Stringer
	io.Reader
	io.Seeker
	io.Closer
	Type() types.AssetType
	Source() Source
	Path() string
	Data() ([]byte, error)
}

Asset represents a game asset. It has a type, an asset source, a sub-path (within the asset source), and it can read data and seek within the data

type Source

type Source interface {
	fmt.Stringer
	Open(name string) (io.ReadSeeker, error)
	Path() string
	Exists(subPath string) bool
}

Source is an abstraction for something that can load and list assets

Directories

Path Synopsis
Package types provides an enumeration of Asset and Source types, as well as some utility functions
Package types provides an enumeration of Asset and Source types, as well as some utility functions

Jump to

Keyboard shortcuts

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