public class AssetPack

  1. Object
  2. AssetPack
A themed collection of AssetDefs – the editor’s “Platformer”, “Top-Down RPG” or “Board & Card” pack. A GameLevel names the pack it draws from (GameLevel#getAssetPack()), and an AssetCatalog indexes every pack so a placed element’s GameElement#getAssetId() resolves to its AssetDef.

Constructors

public AssetPack()
public AssetPack(String id, String name)

Methods

public String getId()
public AssetPack setId(String id)
public String getName()
public AssetPack setName(String name)
public AssetPack add(AssetDef def)Adds an asset definition to the pack (replacing any with the same id).
public AssetDef get(String assetId)
public boolean contains(String assetId)
public List<AssetDef> assets()The asset definitions in insertion order (the order they appear in a palette).
public int size()

Inherited methods

Constructor details

AssetPack

public AssetPack()

AssetPack

public AssetPack(String id, String name)

Method details

getId

public String getId()

setId

public AssetPack setId(String id)

getName

public String getName()

setName

public AssetPack setName(String name)

add

public AssetPack add(AssetDef def)
Adds an asset definition to the pack (replacing any with the same id).

get

public AssetDef get(String assetId)

contains

public boolean contains(String assetId)

assets

public List<AssetDef> assets()
The asset definitions in insertion order (the order they appear in a palette).

size

public int size()