
com.github.czyzby.kiwi.util.gdx.asset.Asset Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gdx-kiwi Show documentation
Show all versions of gdx-kiwi Show documentation
Guava-inspired set of utilities for LibGDX.
package com.github.czyzby.kiwi.util.gdx.asset;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.files.FileHandle;
/** Contains path, class and some basic information of a single asset. Meant to be represented by an enum - asset
* management utility.
*
* @author MJ */
public interface Asset {
/** @return location at which the resource should be present. */
public String getPath();
/** @return class of the object that should be created using the loaded asset. */
public Class> getAssetClass();
/** @return file handle created with the assets path. */
public FileHandle getFileHandle();
/** @return type of the asset, used by AbstractAssetManager to filter assets that need to be loaded. */
public AssetType getAssetType();
/** @param withManager will schedule loading of this asset. */
public void load(AssetManager withManager);
/** @param fromManager has to contain the loaded asset.
* @return asset represented by this container. */
public Object get(AssetManager fromManager);
/** @param withType class of the loaded asset.
* @param fromManager has to contain the loaded asset.
* @return asset represented by this container.
* @param type of stored asset. */
public Type get(Class withType, AssetManager fromManager);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy