animation
Class AnimationPool

java.lang.Object
  extended by animation.AnimationPool
All Implemented Interfaces:
java.io.Serializable

public class AnimationPool
extends java.lang.Object
implements java.io.Serializable

This class is used to manage the animation sequences of a game object

Author:
Frank Bruns
See Also:
Serialized Form

Constructor Summary
AnimationPool()
          Creates a new empty pool of animation sequences.
 
Method Summary
 void add(java.lang.String name, java.awt.image.BufferedImage[] images)
          Adds an animation to the animation manager
 boolean containsAnim(java.lang.String name)
          Determines, if the animatio pool contains the animation identified by the specified name
 java.awt.image.BufferedImage[] getAnimSequence(java.lang.String name)
          Returns the animation sequence that refers to the specified reference name
 void remove(java.lang.String name)
          Removes an animation sequence from the animation pool
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimationPool

public AnimationPool()
Creates a new empty pool of animation sequences. Add animation sequences by using the add() method of this class.

Method Detail

getAnimSequence

public java.awt.image.BufferedImage[] getAnimSequence(java.lang.String name)
Returns the animation sequence that refers to the specified reference name

Parameters:
name - reference name of the animation
Returns:
animation sequence refering to the specified name

containsAnim

public boolean containsAnim(java.lang.String name)
Determines, if the animatio pool contains the animation identified by the specified name

Parameters:
name - name of the animation
Returns:
contain animation? --> true=yes, false=no

add

public void add(java.lang.String name,
                java.awt.image.BufferedImage[] images)
Adds an animation to the animation manager

Parameters:
name - name refering to the animation
images - images that form the animation

remove

public void remove(java.lang.String name)
Removes an animation sequence from the animation pool

Parameters:
name - name of the animation to remove