be.saltwater.jaqel.creature.loaders
Interface CreatureLoader

All Known Implementing Classes:
XMLCreatureLoader

public interface CreatureLoader

Interface for the loading of creature files. These are stored in CreatureLoadData objects. These object are then used to create new Creature's. Implementations may use their preferred AnimationLoader to load the animations specified in the creature file. A CreatureLoader implementation should create a new CreatureLoadData with a new CreatureTypeData with all animations, the texture, ... specified in the file. The difference between CreatureLoadData and CreatureTypeData is that CreatureLoadData contains information that is stored in the Creature class and can vary from creature to creature (for example from knight to knight).

Author:
Bruno Windels
See Also:
CreatureLoadData, CreatureLoadHelper

Method Summary
 CreatureLoadData load(java.lang.String filename, java.lang.String type)
          Loads the file.
 

Method Detail

load

public CreatureLoadData load(java.lang.String filename,
                             java.lang.String type)
                      throws java.io.IOException,
                             IllegalFormatException
Loads the file.

Parameters:
filename - The filename of the file that should be loaded.
type - The type key of the creature that is in the file. Needed to pass to the CreatureTypeData constructor.
Throws:
java.io.IOException - When there was a problem reading the specified file.
IllegalFormatException - When the format of the file is not as expected.