<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_17) on Sun Nov 03 15:35:41 CET 2013 -->
<title>AssetManager (libgdx API)
</title>
<meta name="date" content="2013-11-03">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="AssetManager (libgdx API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.
</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview
</a></li>
<li><a href="package-summary.html">Package
</a></li>
<li class="navBarCell1Rev">Class
</li>
<li><a href="class-use/AssetManager.html">Use
</a></li>
<li><a href="package-tree.html">Tree
</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated
</a></li>
<li><a href="../../../../index-all.html">Index
</a></li>
<li><a href="../../../../help-doc.html">Help
</a></li>
</ul>
<div class="aboutLanguage"><em>
libgdx API
<style>
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
.TableHeadingColor { background:#EEEEFF; }
a { text-decoration:none }
a:hover { text-decoration:underline }
a:link, a:visited { color:blue }
table { border:0px }
.TableRowColor td:first-child { border-left:1px solid black }
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
hr { border:0px; border-bottom:1px solid #333366; }
</style>
</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.LoadedCallback.html" title="interface in com.badlogic.gdx.assets"><span class="strong">Prev Class
</span></a></li>
<li><a href="../../../../com/badlogic/gdx/assets/RefCountedContainer.html" title="class in com.badlogic.gdx.assets"><span class="strong">Next Class
</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/badlogic/gdx/assets/AssetManager.html" target="_top">Frames
</a></li>
<li><a href="AssetManager.html" target="_top">No Frames
</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes
</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:
</li>
<li>Nested
|
</li>
<li>Field
|
</li>
<li><a href="#constructor_summary">Constr
</a> |
</li>
<li><a href="#method_summary">Method
</a></li>
</ul>
<ul class="subNavList">
<li>Detail:
</li>
<li>Field
|
</li>
<li><a href="#constructor_detail">Constr
</a> |
</li>
<li><a href="#method_detail">Method
</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.badlogic.gdx.assets
</div>
<h2 title="Class AssetManager" class="title">Class AssetManager
</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object
</li>
<li>
<ul class="inheritance">
<li>com.badlogic.gdx.assets.AssetManager
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:
</dt>
<dd><a href="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable
</a></dd>
</dl>
<hr>
<br>
<pre>public class
<span class="strong">AssetManager
</span>
extends java.lang.Object
implements
<a href="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable
</a></pre>
<div class="block">Loads and stores assets like textures, bitmapfonts, tile maps, sounds, music and so on.
</div>
<dl><dt><span class="strong">Author:
</span></dt>
<dd>mzechner
</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary
</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors
</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description
</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#AssetManager()">AssetManager
</a></strong>()
</code>
<div class="block">Creates a new AssetManager with all default loaders.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#AssetManager(com.badlogic.gdx.assets.loaders.FileHandleResolver)">AssetManager
</a></strong>(
<a href="../../../../com/badlogic/gdx/assets/loaders/FileHandleResolver.html" title="interface in com.badlogic.gdx.assets.loaders">FileHandleResolver
</a> resolver)
</code>
<div class="block">Creates a new AssetManager with all default loaders.
</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary
</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods
</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type
</th>
<th class="colLast" scope="col">Method and Description
</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected
<T
> void
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#addAsset(java.lang.String, java.lang.Class, T)">addAsset
</a></strong>(java.lang.String
fileName,
java.lang.Class
<T
> type,
T
asset)
</code>
<div class="block">Adds an asset to this AssetManager
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#clear()">clear
</a></strong>()
</code>
<div class="block">Clears and disposes all assets and the preloading queue.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><T
> boolean
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#containsAsset(T)">containsAsset
</a></strong>(T
asset)
</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#dispose()">dispose
</a></strong>()
</code>
<div class="block">Disposes all assets in the manager and stops all asynchronous loading.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#finishLoading()">finishLoading
</a></strong>()
</code>
<div class="block">blocks until all assets are loaded.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><T
> T
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#get(com.badlogic.gdx.assets.AssetDescriptor)">get
</a></strong>(
<a href="../../../../com/badlogic/gdx/assets/AssetDescriptor.html" title="class in com.badlogic.gdx.assets">AssetDescriptor
</a><T
> assetDescriptor)
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><T
> T
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#get(java.lang.String)">get
</a></strong>(java.lang.String
fileName)
</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><T
> T
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#get(java.lang.String, java.lang.Class)">get
</a></strong>(java.lang.String
fileName,
java.lang.Class
<T
> type)
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><T
> java.lang.String
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#getAssetFileName(T)">getAssetFileName
</a></strong>(T
asset)
</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array
</a><java.lang.String
></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#getAssetNames()">getAssetNames
</a></strong>()
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.Class
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#getAssetType(java.lang.String)">getAssetType
</a></strong>(java.lang.String
fileName)
</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array
</a><java.lang.String
></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#getDependencies(java.lang.String)">getDependencies
</a></strong>(java.lang.String
fileName)
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#getDiagnostics()">getDiagnostics
</a></strong>()
</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#getLoadedAssets()">getLoadedAssets
</a></strong>()
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><T
> <a href="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders">AssetLoader
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#getLoader(java.lang.Class)">getLoader
</a></strong>(java.lang.Class
<T
> type)
</code>
<div class="block">Returns the default loader for the given type
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><T
> <a href="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders">AssetLoader
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#getLoader(java.lang.Class, java.lang.String)">getLoader
</a></strong>(java.lang.Class
<T
> type,
java.lang.String
fileName)
</code>
<div class="block">Returns the loader for the given type and the specified filename.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/Logger.html" title="class in com.badlogic.gdx.utils">Logger
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#getLogger()">getLogger
</a></strong>()
</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>float
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#getProgress()">getProgress
</a></strong>()
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#getQueuedAssets()">getQueuedAssets
</a></strong>()
</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#getReferenceCount(java.lang.String)">getReferenceCount
</a></strong>(java.lang.String
fileName)
</code>
<div class="block">Returns the reference count of an asset.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#isLoaded(java.lang.String)">isLoaded
</a></strong>(java.lang.String
fileName)
</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#isLoaded(java.lang.String, java.lang.Class)">isLoaded
</a></strong>(java.lang.String
fileName,
java.lang.Class
type)
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#load(com.badlogic.gdx.assets.AssetDescriptor)">load
</a></strong>(
<a href="../../../../com/badlogic/gdx/assets/AssetDescriptor.html" title="class in com.badlogic.gdx.assets">AssetDescriptor
</a> desc)
</code>
<div class="block">Adds the given asset to the loading queue of the AssetManager.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><T
> void
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#load(java.lang.String, java.lang.Class)">load
</a></strong>(java.lang.String
fileName,
java.lang.Class
<T
> type)
</code>
<div class="block">Adds the given asset to the loading queue of the AssetManager.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><T
> void
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#load(java.lang.String, java.lang.Class, com.badlogic.gdx.assets.AssetLoaderParameters)">load
</a></strong>(java.lang.String
fileName,
java.lang.Class
<T
> type,
<a href="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.html" title="class in com.badlogic.gdx.assets">AssetLoaderParameters
</a><T
> parameter)
</code>
<div class="block">Adds the given asset to the loading queue of the AssetManager.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#setErrorListener(com.badlogic.gdx.assets.AssetErrorListener)">setErrorListener
</a></strong>(
<a href="../../../../com/badlogic/gdx/assets/AssetErrorListener.html" title="interface in com.badlogic.gdx.assets">AssetErrorListener
</a> listener)
</code>
<div class="block">Sets an
<a href="../../../../com/badlogic/gdx/assets/AssetErrorListener.html" title="interface in com.badlogic.gdx.assets"><code>AssetErrorListener
</code></a> to be invoked in case loading an asset failed.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><T,P extends
<a href="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.html" title="class in com.badlogic.gdx.assets">AssetLoaderParameters
</a><T
>> <br>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#setLoader(java.lang.Class, com.badlogic.gdx.assets.loaders.AssetLoader)">setLoader
</a></strong>(java.lang.Class
<T
> type,
<a href="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders">AssetLoader
</a><T,P
> loader)
</code>
<div class="block">Sets a new
<a href="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders"><code>AssetLoader
</code></a> for the given type.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><T,P extends
<a href="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.html" title="class in com.badlogic.gdx.assets">AssetLoaderParameters
</a><T
>> <br>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#setLoader(java.lang.Class, java.lang.String, com.badlogic.gdx.assets.loaders.AssetLoader)">setLoader
</a></strong>(java.lang.Class
<T
> type,
java.lang.String
suffix,
<a href="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders">AssetLoader
</a><T,P
> loader)
</code>
<div class="block">Sets a new
<a href="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders"><code>AssetLoader
</code></a> for the given type.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#setReferenceCount(java.lang.String, int)">setReferenceCount
</a></strong>(java.lang.String
fileName,
int
refCount)
</code>
<div class="block">Sets the reference count of an asset.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#unload(java.lang.String)">unload
</a></strong>(java.lang.String
fileName)
</code>
<div class="block">Removes the asset and all its dependencies if they are not used by other assets.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#update()">update
</a></strong>()
</code>
<div class="block">Updates the AssetManager, keeping it loading any assets in the preload queue.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean
</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/assets/AssetManager.html#update(int)">update
</a></strong>(int
millis)
</code>
<div class="block">Updates the AssetManager continuously for the specified number of milliseconds, yeilding the CPU to the loading thread
between updates.
</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class
java.lang.Object
</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail
</h3>
<a name="AssetManager()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>AssetManager
</h4>
<pre>public
AssetManager()
</pre>
<div class="block">Creates a new AssetManager with all default loaders.
</div>
</li>
</ul>
<a name="AssetManager(com.badlogic.gdx.assets.loaders.FileHandleResolver)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>AssetManager
</h4>
<pre>public
AssetManager(
<a href="../../../../com/badlogic/gdx/assets/loaders/FileHandleResolver.html" title="interface in com.badlogic.gdx.assets.loaders">FileHandleResolver
</a> resolver)
</pre>
<div class="block">Creates a new AssetManager with all default loaders.
</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail
</h3>
<a name="get(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get
</h4>
<pre>public
<T
> T
get(java.lang.String
fileName)
</pre>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>fileName
</code> - the asset file name
</dd>
<dt><span class="strong">Returns:
</span></dt><dd>the asset
</dd></dl>
</li>
</ul>
<a name="get(java.lang.String, java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get
</h4>
<pre>public
<T
> T
get(java.lang.String
fileName,
java.lang.Class
<T
> type)
</pre>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>fileName
</code> - the asset file name
</dd><dd><code>type
</code> - the asset type
</dd>
<dt><span class="strong">Returns:
</span></dt><dd>the asset
</dd></dl>
</li>
</ul>
<a name="get(com.badlogic.gdx.assets.AssetDescriptor)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get
</h4>
<pre>public
<T
> T
get(
<a href="../../../../com/badlogic/gdx/assets/AssetDescriptor.html" title="class in com.badlogic.gdx.assets">AssetDescriptor
</a><T
> assetDescriptor)
</pre>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>assetDescriptor
</code> - the asset descriptor
</dd>
<dt><span class="strong">Returns:
</span></dt><dd>the asset
</dd></dl>
</li>
</ul>
<a name="unload(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unload
</h4>
<pre>public
void
unload(java.lang.String
fileName)
</pre>
<div class="block">Removes the asset and all its dependencies if they are not used by other assets.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>fileName
</code> - the file name
</dd></dl>
</li>
</ul>
<a name="containsAsset(java.lang.Object)">
<!-- -->
</a><a name="containsAsset(T)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containsAsset
</h4>
<pre>public
<T
> boolean
containsAsset(T
asset)
</pre>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>asset
</code> - the asset
</dd>
<dt><span class="strong">Returns:
</span></dt><dd>whether the asset is contained in this manager
</dd></dl>
</li>
</ul>
<a name="getAssetFileName(java.lang.Object)">
<!-- -->
</a><a name="getAssetFileName(T)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAssetFileName
</h4>
<pre>public
<T
> java.lang.String
getAssetFileName(T
asset)
</pre>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>asset
</code> - the asset
</dd>
<dt><span class="strong">Returns:
</span></dt><dd>the filename of the asset or null
</dd></dl>
</li>
</ul>
<a name="isLoaded(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isLoaded
</h4>
<pre>public
boolean
isLoaded(java.lang.String
fileName)
</pre>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>fileName
</code> - the file name of the asset
</dd>
<dt><span class="strong">Returns:
</span></dt><dd>whether the asset is loaded
</dd></dl>
</li>
</ul>
<a name="isLoaded(java.lang.String, java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isLoaded
</h4>
<pre>public
boolean
isLoaded(java.lang.String
fileName,
java.lang.Class
type)
</pre>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>fileName
</code> - the file name of the asset
</dd>
<dt><span class="strong">Returns:
</span></dt><dd>whether the asset is loaded
</dd></dl>
</li>
</ul>
<a name="getLoader(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLoader
</h4>
<pre>public
<T
> <a href="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders">AssetLoader
</a> getLoader(java.lang.Class
<T
> type)
</pre>
<div class="block">Returns the default loader for the given type
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>type
</code> - The type of the loader to get
</dd>
<dt><span class="strong">Returns:
</span></dt><dd>The loader capable of loading the type, or null if none exists
</dd></dl>
</li>
</ul>
<a name="getLoader(java.lang.Class, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLoader
</h4>
<pre>public
<T
> <a href="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders">AssetLoader
</a> getLoader(java.lang.Class
<T
> type,
java.lang.String
fileName)
</pre>
<div class="block">Returns the loader for the given type and the specified filename. If no loader exists for the specific filename, the default
loader for that type is returned.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>type
</code> - The type of the loader to get
</dd><dd><code>fileName
</code> - The filename of the asset to get a loader for, or null to get the default loader
</dd>
<dt><span class="strong">Returns:
</span></dt><dd>The loader capable of loading the type and filename, or null if none exists
</dd></dl>
</li>
</ul>
<a name="load(java.lang.String, java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>load
</h4>
<pre>public
<T
> void
load(java.lang.String
fileName,
java.lang.Class
<T
> type)
</pre>
<div class="block">Adds the given asset to the loading queue of the AssetManager.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>fileName
</code> - the file name (interpretation depends on
<a href="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders"><code>AssetLoader
</code></a>)
</dd><dd><code>type
</code> - the type of the asset.
</dd></dl>
</li>
</ul>
<a name="load(java.lang.String, java.lang.Class, com.badlogic.gdx.assets.AssetLoaderParameters)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>load
</h4>
<pre>public
<T
> void
load(java.lang.String
fileName,
java.lang.Class
<T
> type,
<a href="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.html" title="class in com.badlogic.gdx.assets">AssetLoaderParameters
</a><T
> parameter)
</pre>
<div class="block">Adds the given asset to the loading queue of the AssetManager.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>fileName
</code> - the file name (interpretation depends on
<a href="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders"><code>AssetLoader
</code></a>)
</dd><dd><code>type
</code> - the type of the asset.
</dd><dd><code>parameter
</code> - parameters for the AssetLoader.
</dd></dl>
</li>
</ul>
<a name="load(com.badlogic.gdx.assets.AssetDescriptor)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>load
</h4>
<pre>public
void
load(
<a href="../../../../com/badlogic/gdx/assets/AssetDescriptor.html" title="class in com.badlogic.gdx.assets">AssetDescriptor
</a> desc)
</pre>
<div class="block">Adds the given asset to the loading queue of the AssetManager.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>desc
</code> - the
<a href="../../../../com/badlogic/gdx/assets/AssetDescriptor.html" title="class in com.badlogic.gdx.assets"><code>AssetDescriptor
</code></a></dd></dl>
</li>
</ul>
<a name="update()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update
</h4>
<pre>public
boolean
update()
</pre>
<div class="block">Updates the AssetManager, keeping it loading any assets in the preload queue.
</div>
<dl><dt><span class="strong">Returns:
</span></dt><dd>true if all loading is finished.
</dd></dl>
</li>
</ul>
<a name="update(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update
</h4>
<pre>public
boolean
update(int
millis)
</pre>
<div class="block">Updates the AssetManager continuously for the specified number of milliseconds, yeilding the CPU to the loading thread
between updates. This may block for less time if all loading tasks are complete. This may block for more time if the portion
of a single task that happens in the GL thread takes a long time.
</div>
<dl><dt><span class="strong">Returns:
</span></dt><dd>true if all loading is finished.
</dd></dl>
</li>
</ul>
<a name="finishLoading()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>finishLoading
</h4>
<pre>public
void
finishLoading()
</pre>
<div class="block">blocks until all assets are loaded.
</div>
</li>
</ul>
<a name="addAsset(java.lang.String,java.lang.Class,java.lang.Object)">
<!-- -->
</a><a name="addAsset(java.lang.String, java.lang.Class, T)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addAsset
</h4>
<pre>protected
<T
> void
addAsset(java.lang.String
fileName,
java.lang.Class
<T
> type,
T
asset)
</pre>
<div class="block">Adds an asset to this AssetManager
</div>
</li>
</ul>
<a name="setLoader(java.lang.Class, com.badlogic.gdx.assets.loaders.AssetLoader)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLoader
</h4>
<pre>public
<T,P extends
<a href="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.html" title="class in com.badlogic.gdx.assets">AssetLoaderParameters
</a><T
>> void
setLoader(java.lang.Class
<T
> type,
<a href="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders">AssetLoader
</a><T,P
> loader)
</pre>
<div class="block">Sets a new
<a href="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders"><code>AssetLoader
</code></a> for the given type.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>type
</code> - the type of the asset
</dd><dd><code>loader
</code> - the loader
</dd></dl>
</li>
</ul>
<a name="setLoader(java.lang.Class, java.lang.String, com.badlogic.gdx.assets.loaders.AssetLoader)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLoader
</h4>
<pre>public
<T,P extends
<a href="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.html" title="class in com.badlogic.gdx.assets">AssetLoaderParameters
</a><T
>> void
setLoader(java.lang.Class
<T
> type,
java.lang.String
suffix,
<a href="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders">AssetLoader
</a><T,P
> loader)
</pre>
<div class="block">Sets a new
<a href="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders"><code>AssetLoader
</code></a> for the given type.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>type
</code> - the type of the asset
</dd><dd><code>suffix
</code> - the suffix the filename must have for this loader to be used or null to specify the default loader.
</dd><dd><code>loader
</code> - the loader
</dd></dl>
</li>
</ul>
<a name="getLoadedAssets()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLoadedAssets
</h4>
<pre>public
int
getLoadedAssets()
</pre>
<dl><dt><span class="strong">Returns:
</span></dt><dd>the number of loaded assets
</dd></dl>
</li>
</ul>
<a name="getQueuedAssets()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getQueuedAssets
</h4>
<pre>public
int
getQueuedAssets()
</pre>
<dl><dt><span class="strong">Returns:
</span></dt><dd>the number of currently queued assets
</dd></dl>
</li>
</ul>
<a name="getProgress()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProgress
</h4>
<pre>public
float
getProgress()
</pre>
<dl><dt><span class="strong">Returns:
</span></dt><dd>the progress in percent of completion.
</dd></dl>
</li>
</ul>
<a name="setErrorListener(com.badlogic.gdx.assets.AssetErrorListener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setErrorListener
</h4>
<pre>public
void
setErrorListener(
<a href="../../../../com/badlogic/gdx/assets/AssetErrorListener.html" title="interface in com.badlogic.gdx.assets">AssetErrorListener
</a> listener)
</pre>
<div class="block">Sets an
<a href="../../../../com/badlogic/gdx/assets/AssetErrorListener.html" title="interface in com.badlogic.gdx.assets"><code>AssetErrorListener
</code></a> to be invoked in case loading an asset failed.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>listener
</code> - the listener or null
</dd></dl>
</li>
</ul>
<a name="dispose()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dispose
</h4>
<pre>public
void
dispose()
</pre>
<div class="block">Disposes all assets in the manager and stops all asynchronous loading.
</div>
<dl>
<dt><strong>Specified by:
</strong></dt>
<dd><code><a href="../../../../com/badlogic/gdx/utils/Disposable.html#dispose()">dispose
</a></code> in interface
<code><a href="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable
</a></code></dd>
</dl>
</li>
</ul>
<a name="clear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear
</h4>
<pre>public
void
clear()
</pre>
<div class="block">Clears and disposes all assets and the preloading queue.
</div>
</li>
</ul>
<a name="getLogger()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLogger
</h4>
<pre>public
<a href="../../../../com/badlogic/gdx/utils/Logger.html" title="class in com.badlogic.gdx.utils">Logger
</a> getLogger()
</pre>
<dl><dt><span class="strong">Returns:
</span></dt><dd>the
<a href="../../../../com/badlogic/gdx/utils/Logger.html" title="class in com.badlogic.gdx.utils"><code>Logger
</code></a> used by the
<a href="../../../../com/badlogic/gdx/assets/AssetManager.html" title="class in com.badlogic.gdx.assets"><code>AssetManager
</code></a></dd></dl>
</li>
</ul>
<a name="getReferenceCount(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReferenceCount
</h4>
<pre>public
int
getReferenceCount(java.lang.String
fileName)
</pre>
<div class="block">Returns the reference count of an asset.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>fileName
</code> -
</dd></dl>
</li>
</ul>
<a name="setReferenceCount(java.lang.String, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setReferenceCount
</h4>
<pre>public
void
setReferenceCount(java.lang.String
fileName,
int
refCount)
</pre>
<div class="block">Sets the reference count of an asset.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>fileName
</code> -
</dd></dl>
</li>
</ul>
<a name="getDiagnostics()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDiagnostics
</h4>
<pre>public
java.lang.String
getDiagnostics()
</pre>
<dl><dt><span class="strong">Returns:
</span></dt><dd>a string containg ref count and dependency information for all assets.
</dd></dl>
</li>
</ul>
<a name="getAssetNames()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAssetNames
</h4>
<pre>public
<a href="../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array
</a><java.lang.String
> getAssetNames()
</pre>
<dl><dt><span class="strong">Returns:
</span></dt><dd>the file names of all loaded assets.
</dd></dl>
</li>
</ul>
<a name="getDependencies(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDependencies
</h4>
<pre>public
<a href="../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array
</a><java.lang.String
> getDependencies(java.lang.String
fileName)
</pre>
<dl><dt><span class="strong">Returns:
</span></dt><dd>the dependencies of an asset or null if the asset has no dependencies.
</dd></dl>
</li>
</ul>
<a name="getAssetType(java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getAssetType
</h4>
<pre>public
java.lang.Class
getAssetType(java.lang.String
fileName)
</pre>
<dl><dt><span class="strong">Returns:
</span></dt><dd>the type of a loaded asset.
</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview
</a></li>
<li><a href="package-summary.html">Package
</a></li>
<li class="navBarCell1Rev">Class
</li>
<li><a href="class-use/AssetManager.html">Use
</a></li>
<li><a href="package-tree.html">Tree
</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated
</a></li>
<li><a href="../../../../index-all.html">Index
</a></li>
<li><a href="../../../../help-doc.html">Help
</a></li>
</ul>
<div class="aboutLanguage"><em>libgdx API
</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.LoadedCallback.html" title="interface in com.badlogic.gdx.assets"><span class="strong">Prev Class
</span></a></li>
<li><a href="../../../../com/badlogic/gdx/assets/RefCountedContainer.html" title="class in com.badlogic.gdx.assets"><span class="strong">Next Class
</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/badlogic/gdx/assets/AssetManager.html" target="_top">Frames
</a></li>
<li><a href="AssetManager.html" target="_top">No Frames
</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes
</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:
</li>
<li>Nested
|
</li>
<li>Field
|
</li>
<li><a href="#constructor_summary">Constr
</a> |
</li>
<li><a href="#method_summary">Method
</a></li>
</ul>
<ul class="subNavList">
<li>Detail:
</li>
<li>Field
|
</li>
<li><a href="#constructor_detail">Constr
</a> |
</li>
<li><a href="#method_detail">Method
</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
<div style="font-size:9pt"><i>
Copyright
© 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
</i></div>
</small></p>
</body>
</html>