group1.model.gameobject
Class PictureList

java.lang.Object
  extended by group1.model.gameobject.PictureList

public class PictureList
extends java.lang.Object

A PictureList is a list of lists of pictures. There is one list of pictures for each valid state as defined in GameObjStates. Each list enumerates the frames of animation to show for a game object in that state.

Each GameObj should have a unique instance of this class, and every picture in that instance must depict that particular GameObj. For instance, either Jeff or an enemy can be in the GameObjStates.RUNNING state, but there are different animations for Jeff running and an enemy running.

Each list of pictures for a particular state will be henceforth referred to as a "film." This class will be able to contain as many films as there are valid states in the game.


Constructor Summary
PictureList()
          Creates an empty picture list database.
 
Method Summary
 void addFilm(java.util.List<java.io.File> l, GameObjState g)
          Adds a list of pictures to the PictureList
 java.util.List<java.io.File> getFilm(GameObjState g)
          Accesses the film for a given state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PictureList

public PictureList()
Creates an empty picture list database. Each state is initialized to have a film of zero length.

Method Detail

getFilm

public java.util.List<java.io.File> getFilm(GameObjState g)
Accesses the film for a given state. The List will be returned, and then you can use the methods in the List interface to modify the list.

Parameters:
gameObjState - a constant value from GameObjStates
Returns:
a list of files (presumably picture files) that represents the film for the specified state.

addFilm

public void addFilm(java.util.List<java.io.File> l,
                    GameObjState g)
Adds a list of pictures to the PictureList

Parameters:
l - The list of pictures to be added
g - The state under which the list will be added