Class AssetPack

java.lang.Object
com.codename1.gaming.level.AssetPack

public class AssetPack extends Object
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.
  • 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()