<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 02 02:25:04 CEST 2012 -->
<TITLE>
AssetManager (libgdx API)
</TITLE>
<META NAME="date" CONTENT="2012-07-02">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="AssetManager (libgdx API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package
</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class
</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AssetManager.html"><FONT CLASS="NavBarFont1"><B>Use
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help
</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><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>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.LoadedCallback.html" title="interface in com.badlogic.gdx.assets"><B>PREV CLASS
</B></A>
<A HREF="../../../../com/badlogic/gdx/assets/RefCountedContainer.html" title="class in com.badlogic.gdx.assets"><B>NEXT CLASS
</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/badlogic/gdx/assets/AssetManager.html" target="_top"><B>FRAMES
</B></A>
<A HREF="AssetManager.html" target="_top"><B>NO FRAMES
</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes
</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:
NESTED
|
FIELD
|
<A HREF="#constructor_summary">CONSTR
</A> |
<A HREF="#method_summary">METHOD
</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:
FIELD
|
<A HREF="#constructor_detail">CONSTR
</A> |
<A HREF="#method_detail">METHOD
</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.badlogic.gdx.assets
</FONT>
<BR>
Class AssetManager
</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.assets.AssetManager
</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:
</B> <DD><A HREF="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable
</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class
<B>AssetManager
</B><DT>extends java.lang.Object
<DT>implements
<A HREF="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable
</A></DL>
</PRE>
<P>
Loads and stores assets like textures, bitmapfonts, tile maps, sounds, music and so on.
<P>
<P>
<DL>
<DT><B>Author:
</B></DT>
<DD>mzechner
</DD>
</DL>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#AssetManager()">AssetManager
</A></B>()
</CODE>
<BR>
Creates a new AssetManager with all default loaders.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#AssetManager(com.badlogic.gdx.assets.loaders.FileHandleResolver)">AssetManager
</A></B>(
<A HREF="../../../../com/badlogic/gdx/assets/loaders/FileHandleResolver.html" title="interface in com.badlogic.gdx.assets.loaders">FileHandleResolver
</A> resolver)
</CODE>
<BR>
Creates a new AssetManager with all default loaders.
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#clear()">clear
</A></B>()
</CODE>
<BR>
Clears and disposes all assets and the preloading queue.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><T
> boolean
</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#containsAsset(T)">containsAsset
</A></B>(T
asset)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#dispose()">dispose
</A></B>()
</CODE>
<BR>
Disposes all assets in the manager and stops all asynchronous loading.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#finishLoading()">finishLoading
</A></B>()
</CODE>
<BR>
blocks until all assets are loaded.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><T
> T
</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#get(java.lang.String, java.lang.Class)">get
</A></B>(java.lang.String
fileName,
java.lang.Class
<T
> type)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><T
> java.lang.String
</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#getAssetFileName(T)">getAssetFileName
</A></B>(T
asset)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#getDiagnostics()">getDiagnostics
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#getLoadedAssets()">getLoadedAssets
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/utils/Logger.html" title="class in com.badlogic.gdx.utils">Logger
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#getLogger()">getLogger
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#getProgress()">getProgress
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#getQueuedAssets()">getQueuedAssets
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#getReferenceCount(java.lang.String)">getReferenceCount
</A></B>(java.lang.String
fileName)
</CODE>
<BR>
Returns the reference count of an asset.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#isLoaded(java.lang.String)">isLoaded
</A></B>(java.lang.String
fileName)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#isLoaded(java.lang.String, java.lang.Class)">isLoaded
</A></B>(java.lang.String
fileName,
java.lang.Class
type)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#load(com.badlogic.gdx.assets.AssetDescriptor)">load
</A></B>(
<A HREF="../../../../com/badlogic/gdx/assets/AssetDescriptor.html" title="class in com.badlogic.gdx.assets">AssetDescriptor
</A> desc)
</CODE>
<BR>
Adds the given asset to the loading queue of the AssetManager.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><T
> void
</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#load(java.lang.String, java.lang.Class)">load
</A></B>(java.lang.String
fileName,
java.lang.Class
<T
> type)
</CODE>
<BR>
Adds the given asset to the loading queue of the AssetManager.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><T
> void
</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#load(java.lang.String, java.lang.Class, com.badlogic.gdx.assets.AssetLoaderParameters)">load
</A></B>(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>
<BR>
Adds the given asset to the loading queue of the AssetManager.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#setErrorListener(com.badlogic.gdx.assets.AssetErrorListener)">setErrorListener
</A></B>(
<A HREF="../../../../com/badlogic/gdx/assets/AssetErrorListener.html" title="interface in com.badlogic.gdx.assets">AssetErrorListener
</A> listener)
</CODE>
<BR>
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.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<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></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#setLoader(java.lang.Class, com.badlogic.gdx.assets.loaders.AssetLoader)">setLoader
</A></B>(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>
<BR>
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.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#setReferenceCount(java.lang.String, int)">setReferenceCount
</A></B>(java.lang.String
fileName,
int
refCount)
</CODE>
<BR>
Sets the reference count of an asset.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#unload(java.lang.String)">unload
</A></B>(java.lang.String
fileName)
</CODE>
<BR>
Removes the asset and all its dependencies if they are not used by other assets.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#update()">update
</A></B>()
</CODE>
<BR>
Updates the AssetManager, keeping it loading any assets in the preload queue.
</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object
</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="AssetManager()"><!-- --></A><H3>
AssetManager
</H3>
<PRE>
public
<B>AssetManager
</B>()
</PRE>
<DL>
<DD>Creates a new AssetManager with all default loaders.
<P>
</DL>
<HR>
<A NAME="AssetManager(com.badlogic.gdx.assets.loaders.FileHandleResolver)"><!-- --></A><H3>
AssetManager
</H3>
<PRE>
public
<B>AssetManager
</B>(
<A HREF="../../../../com/badlogic/gdx/assets/loaders/FileHandleResolver.html" title="interface in com.badlogic.gdx.assets.loaders">FileHandleResolver
</A> resolver)
</PRE>
<DL>
<DD>Creates a new AssetManager with all default loaders.
<P>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="get(java.lang.String, java.lang.Class)"><!-- --></A><H3>
get
</H3>
<PRE>
public
<T
> T
<B>get
</B>(java.lang.String
fileName,
java.lang.Class
<T
> type)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>fileName
</CODE> - the asset file name
<DD><CODE>type
</CODE> - the asset type
<DT><B>Returns:
</B><DD>the asset
</DL>
</DD>
</DL>
<HR>
<A NAME="unload(java.lang.String)"><!-- --></A><H3>
unload
</H3>
<PRE>
public void
<B>unload
</B>(java.lang.String
fileName)
</PRE>
<DL>
<DD>Removes the asset and all its dependencies if they are not used by other assets.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>fileName
</CODE> - the file name
</DL>
</DD>
</DL>
<HR>
<A NAME="containsAsset(java.lang.Object)"><!-- --></A><A NAME="containsAsset(T)"><!-- --></A><H3>
containsAsset
</H3>
<PRE>
public
<T
> boolean
<B>containsAsset
</B>(T
asset)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>asset
</CODE> - the asset
<DT><B>Returns:
</B><DD>whether the asset is contained in this manager
</DL>
</DD>
</DL>
<HR>
<A NAME="getAssetFileName(java.lang.Object)"><!-- --></A><A NAME="getAssetFileName(T)"><!-- --></A><H3>
getAssetFileName
</H3>
<PRE>
public
<T
> java.lang.String
<B>getAssetFileName
</B>(T
asset)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>asset
</CODE> - the asset
<DT><B>Returns:
</B><DD>the filename of the asset or null
</DL>
</DD>
</DL>
<HR>
<A NAME="isLoaded(java.lang.String)"><!-- --></A><H3>
isLoaded
</H3>
<PRE>
public boolean
<B>isLoaded
</B>(java.lang.String
fileName)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>fileName
</CODE> - the file name of the asset
<DT><B>Returns:
</B><DD>whether the asset is loaded
</DL>
</DD>
</DL>
<HR>
<A NAME="isLoaded(java.lang.String, java.lang.Class)"><!-- --></A><H3>
isLoaded
</H3>
<PRE>
public boolean
<B>isLoaded
</B>(java.lang.String
fileName,
java.lang.Class
type)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>fileName
</CODE> - the file name of the asset
<DT><B>Returns:
</B><DD>whether the asset is loaded
</DL>
</DD>
</DL>
<HR>
<A NAME="load(java.lang.String, java.lang.Class)"><!-- --></A><H3>
load
</H3>
<PRE>
public
<T
> void
<B>load
</B>(java.lang.String
fileName,
java.lang.Class
<T
> type)
</PRE>
<DL>
<DD>Adds the given asset to the loading queue of the AssetManager.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><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><CODE>type
</CODE> - the type of the asset.
</DL>
</DD>
</DL>
<HR>
<A NAME="load(java.lang.String, java.lang.Class, com.badlogic.gdx.assets.AssetLoaderParameters)"><!-- --></A><H3>
load
</H3>
<PRE>
public
<T
> void
<B>load
</B>(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>
<DL>
<DD>Adds the given asset to the loading queue of the AssetManager.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><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><CODE>type
</CODE> - the type of the asset.
<DD><CODE>parameter
</CODE> - parameters for the AssetLoader.
</DL>
</DD>
</DL>
<HR>
<A NAME="load(com.badlogic.gdx.assets.AssetDescriptor)"><!-- --></A><H3>
load
</H3>
<PRE>
public void
<B>load
</B>(
<A HREF="../../../../com/badlogic/gdx/assets/AssetDescriptor.html" title="class in com.badlogic.gdx.assets">AssetDescriptor
</A> desc)
</PRE>
<DL>
<DD>Adds the given asset to the loading queue of the AssetManager.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>desc
</CODE> - the
<A HREF="../../../../com/badlogic/gdx/assets/AssetDescriptor.html" title="class in com.badlogic.gdx.assets"><CODE>AssetDescriptor
</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="update()"><!-- --></A><H3>
update
</H3>
<PRE>
public boolean
<B>update
</B>()
</PRE>
<DL>
<DD>Updates the AssetManager, keeping it loading any assets in the preload queue.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>true if all loading is finished.
</DL>
</DD>
</DL>
<HR>
<A NAME="finishLoading()"><!-- --></A><H3>
finishLoading
</H3>
<PRE>
public void
<B>finishLoading
</B>()
</PRE>
<DL>
<DD>blocks until all assets are loaded.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setLoader(java.lang.Class, com.badlogic.gdx.assets.loaders.AssetLoader)"><!-- --></A><H3>
setLoader
</H3>
<PRE>
public
<T,P extends
<A HREF="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.html" title="class in com.badlogic.gdx.assets">AssetLoaderParameters
</A><T
>> void
<B>setLoader
</B>(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>
<DL>
<DD>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.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>type
</CODE> - the type of the asset
<DD><CODE>loader
</CODE> - the loader
</DL>
</DD>
</DL>
<HR>
<A NAME="getLoadedAssets()"><!-- --></A><H3>
getLoadedAssets
</H3>
<PRE>
public int
<B>getLoadedAssets
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>the number of loaded assets
</DL>
</DD>
</DL>
<HR>
<A NAME="getQueuedAssets()"><!-- --></A><H3>
getQueuedAssets
</H3>
<PRE>
public int
<B>getQueuedAssets
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>the number of currently queued assets
</DL>
</DD>
</DL>
<HR>
<A NAME="getProgress()"><!-- --></A><H3>
getProgress
</H3>
<PRE>
public float
<B>getProgress
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>the progress in percent of completion.
</DL>
</DD>
</DL>
<HR>
<A NAME="setErrorListener(com.badlogic.gdx.assets.AssetErrorListener)"><!-- --></A><H3>
setErrorListener
</H3>
<PRE>
public void
<B>setErrorListener
</B>(
<A HREF="../../../../com/badlogic/gdx/assets/AssetErrorListener.html" title="interface in com.badlogic.gdx.assets">AssetErrorListener
</A> listener)
</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>listener
</CODE> - the listener or null
</DL>
</DD>
</DL>
<HR>
<A NAME="dispose()"><!-- --></A><H3>
dispose
</H3>
<PRE>
public void
<B>dispose
</B>()
</PRE>
<DL>
<DD>Disposes all assets in the manager and stops all asynchronous loading.
<P>
<DD><DL>
<DT><B>Specified by:
</B><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></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="clear()"><!-- --></A><H3>
clear
</H3>
<PRE>
public void
<B>clear
</B>()
</PRE>
<DL>
<DD>Clears and disposes all assets and the preloading queue.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getLogger()"><!-- --></A><H3>
getLogger
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/utils/Logger.html" title="class in com.badlogic.gdx.utils">Logger
</A> <B>getLogger
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><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></DL>
</DD>
</DL>
<HR>
<A NAME="getReferenceCount(java.lang.String)"><!-- --></A><H3>
getReferenceCount
</H3>
<PRE>
public int
<B>getReferenceCount
</B>(java.lang.String
fileName)
</PRE>
<DL>
<DD>Returns the reference count of an asset.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>fileName
</CODE> -
</DL>
</DD>
</DL>
<HR>
<A NAME="setReferenceCount(java.lang.String, int)"><!-- --></A><H3>
setReferenceCount
</H3>
<PRE>
public void
<B>setReferenceCount
</B>(java.lang.String
fileName,
int
refCount)
</PRE>
<DL>
<DD>Sets the reference count of an asset.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>fileName
</CODE> -
</DL>
</DD>
</DL>
<HR>
<A NAME="getDiagnostics()"><!-- --></A><H3>
getDiagnostics
</H3>
<PRE>
public java.lang.String
<B>getDiagnostics
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>a string containg ref count and dependency information for all assets.
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package
</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class
</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AssetManager.html"><FONT CLASS="NavBarFont1"><B>Use
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help
</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
libgdx API
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.LoadedCallback.html" title="interface in com.badlogic.gdx.assets"><B>PREV CLASS
</B></A>
<A HREF="../../../../com/badlogic/gdx/assets/RefCountedContainer.html" title="class in com.badlogic.gdx.assets"><B>NEXT CLASS
</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/badlogic/gdx/assets/AssetManager.html" target="_top"><B>FRAMES
</B></A>
<A HREF="AssetManager.html" target="_top"><B>NO FRAMES
</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes
</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:
NESTED
|
FIELD
|
<A HREF="#constructor_summary">CONSTR
</A> |
<A HREF="#method_summary">METHOD
</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:
FIELD
|
<A HREF="#constructor_detail">CONSTR
</A> |
<A HREF="#method_detail">METHOD
</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<div style="font-size:9pt"><i>
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
</i></div>
</BODY>
</HTML>