Subversion Repositories AndroidProjects

Rev

Blame | Last modification | View Log | RSS feed

<!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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/AssetManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</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">
&nbsp;<A HREF="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.LoadedCallback.html" title="interface in com.badlogic.gdx.assets"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<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>  &nbsp;
&nbsp;<A HREF="AssetManager.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;resolver)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new AssetManager with all default loaders.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== 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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#clear()">clear</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&lt;T&gt; 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&nbsp;asset)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#dispose()">dispose</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#finishLoading()">finishLoading</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&lt;T&gt; 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&nbsp;fileName,
    java.lang.Class&lt;T&gt;&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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>&lt;T&gt; 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&nbsp;asset)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#getDiagnostics()">getDiagnostics</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#getLoadedAssets()">getLoadedAssets</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#getProgress()">getProgress</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#getQueuedAssets()">getQueuedAssets</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;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&nbsp;fileName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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&nbsp;fileName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;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&nbsp;fileName,
         java.lang.Class&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;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>&nbsp;desc)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&lt;T&gt; 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&nbsp;fileName,
     java.lang.Class&lt;T&gt;&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&lt;T&gt; 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&nbsp;fileName,
     java.lang.Class&lt;T&gt;&nbsp;type,
     <A HREF="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.html" title="class in com.badlogic.gdx.assets">AssetLoaderParameters</A>&lt;T&gt;&nbsp;parameter)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&lt;T,P extends <A HREF="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.html" title="class in com.badlogic.gdx.assets">AssetLoaderParameters</A>&lt;T&gt;&gt;
<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&lt;T&gt;&nbsp;type,
          <A HREF="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders">AssetLoader</A>&lt;T,P&gt;&nbsp;loader)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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&nbsp;fileName,
                  int&nbsp;refCount)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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&nbsp;fileName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/assets/AssetManager.html#update()">update</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updates the AssetManager, keeping it loading any assets in the preload queue.</TD>
</TR>
</TABLE>
&nbsp;<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>
&nbsp;
<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>&nbsp;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 &lt;T&gt; T <B>get</B>(java.lang.String&nbsp;fileName,
                 java.lang.Class&lt;T&gt;&nbsp;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&nbsp;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 &lt;T&gt; boolean <B>containsAsset</B>(T&nbsp;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 &lt;T&gt; java.lang.String <B>getAssetFileName</B>(T&nbsp;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&nbsp;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&nbsp;fileName,
                        java.lang.Class&nbsp;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 &lt;T&gt; void <B>load</B>(java.lang.String&nbsp;fileName,
                     java.lang.Class&lt;T&gt;&nbsp;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 &lt;T&gt; void <B>load</B>(java.lang.String&nbsp;fileName,
                     java.lang.Class&lt;T&gt;&nbsp;type,
                     <A HREF="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.html" title="class in com.badlogic.gdx.assets">AssetLoaderParameters</A>&lt;T&gt;&nbsp;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>&nbsp;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 &lt;T,P extends <A HREF="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.html" title="class in com.badlogic.gdx.assets">AssetLoaderParameters</A>&lt;T&gt;&gt; void <B>setLoader</B>(java.lang.Class&lt;T&gt;&nbsp;type,
                                                             <A HREF="../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders">AssetLoader</A>&lt;T,P&gt;&nbsp;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>&nbsp;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&nbsp;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&nbsp;fileName,
                              int&nbsp;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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/AssetManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</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">
&nbsp;<A HREF="../../../../com/badlogic/gdx/assets/AssetLoaderParameters.LoadedCallback.html" title="interface in com.badlogic.gdx.assets"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<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>  &nbsp;
&nbsp;<A HREF="AssetManager.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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>