AssetType

indigo.shared.assets.AssetType
See theAssetType companion trait
object AssetType

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
AssetType.type

Members list

Type members

Classlikes

final case class Audio(name: AssetName, path: AssetPath) extends AssetTypePrimitive

Represents any browser compatible audio asset

Represents any browser compatible audio asset

Value parameters

name

the asset name used to look up the loaded asset

path

the path to the asset

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait AssetType
class Object
trait Matchable
class Any
Show all
final case class Font(name: AssetName, path: AssetPath) extends AssetTypePrimitive

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait AssetType
class Object
trait Matchable
class Any
Show all
final case class Image(name: AssetName, path: AssetPath, tag: Option[AssetTag]) extends AssetTypePrimitive

Represents any browser compatible image asset

Represents any browser compatible image asset

Value parameters

name

the asset name used to look up the loaded asset

path

the path to the asset

tag

Images can optionally be "tagged", this tells indigo that images with the same tag should be grouped together for more efficient use. E.g. you might tag all the images for a given level with the same tag.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait AssetType
class Object
trait Matchable
class Any
Show all
object Image

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Image.type
final case class Tagged(tag: AssetTag, images: List[Image]) extends AssetType

Tagged instance, the preferred constructor is the apply method: Tagged("my tag")(image1..imageN)

Tagged instance, the preferred constructor is the apply method: Tagged("my tag")(image1..imageN)

Images can optionally be "tagged", this tells indigo that images with the same tag should be grouped together for more efficient use. E.g. you might tag all the images for a given level with the same tag.

Value parameters

images

The image assets to be tagged

tag

The AssetTag to apply to all the images

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait AssetType
class Object
trait Matchable
class Any
Show all
object Tagged

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Tagged.type
final case class Text(name: AssetName, path: AssetPath) extends AssetTypePrimitive

Represents a text asset, Indigo does not care about the type of data held in the text file, it is up to the programmer to parse it.

Represents a text asset, Indigo does not care about the type of data held in the text file, it is up to the programmer to parse it.

Value parameters

name

the asset name used to look up the loaded asset

path

the path to the asset

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait AssetType
class Object
trait Matchable
class Any
Show all

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def flattenAssetList(assets: List[AssetType]): List[AssetTypePrimitive]

Flattens assets arranged in a Tagged hierarchy into a flat list of loadable assets, appropriately tagged.

Flattens assets arranged in a Tagged hierarchy into a flat list of loadable assets, appropriately tagged.

Value parameters

assets

The potentially tagged hierarchy list.

Attributes

Returns

List[AssetTypePrimitive]

Givens