edu.gatech.cs2335.lemmings.graphics
Class TileSetManager

java.lang.Object
  extended byedu.gatech.cs2335.lemmings.graphics.TileSetManager

public class TileSetManager
extends java.lang.Object

Class TileSetManager: This guy will allow us to manage tilesets in such a fashion that every tileset is only loaded once.

 Revision History:
     v1.0 (Mar. 12, 2004) - Created the TileSetManager class
 

Version:
Version 1.0, Mar. 12, 2004
Author:
Vladimir Urazov

Field Summary
static java.lang.String RESOURCE_MAP_FILE
          The name of the file, where the mappings between the resource names and their paths reside.
 
Method Summary
static TileSetManager getInstance()
          Singleton Implementation.
 TileSet getTileSet(java.lang.String name)
          Returns the tileset with the specified name.
 boolean loadResource(java.lang.String name, java.lang.String path)
          Loads the resource if needed.
 boolean tileSetLoaded(java.lang.String name)
          Returns true if the tileset is loaded and false if it is not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_MAP_FILE

public static final java.lang.String RESOURCE_MAP_FILE
The name of the file, where the mappings between the resource names and their paths reside.

See Also:
Constant Field Values
Method Detail

getInstance

public static TileSetManager getInstance()
Singleton Implementation.

Returns:
a TileSetManager value

loadResource

public boolean loadResource(java.lang.String name,
                            java.lang.String path)
Loads the resource if needed.

Parameters:
name - a String value
path - a String value
Returns:
a boolean value

tileSetLoaded

public boolean tileSetLoaded(java.lang.String name)
Returns true if the tileset is loaded and false if it is not.

Parameters:
name - a String value
Returns:
a boolean value

getTileSet

public TileSet getTileSet(java.lang.String name)
Returns the tileset with the specified name. Loads it if necessary.

Parameters:
name - a String value
Returns:
a TileSet value