jgame.impl
Class Animation

java.lang.Object
  extended by jgame.impl.Animation

public class Animation
extends java.lang.Object


Field Summary
 int increment
           
 boolean pingpong
           
 double speed
           
 
Constructor Summary
Animation(java.lang.String[] frames, double speed)
           
Animation(java.lang.String[] frames, double speed, boolean pingpong)
           
Animation(java.lang.String[] frames, double speed, boolean pingpong, int increment)
           
 
Method Summary
 java.lang.String animate(double speedmul)
          Does one animation step and returns current image.
 Animation copy()
           
 java.lang.String getCurrentFrame()
           
 void reset()
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

speed

public double speed

increment

public int increment

pingpong

public boolean pingpong
Constructor Detail

Animation

public Animation(java.lang.String[] frames,
                 double speed)

Animation

public Animation(java.lang.String[] frames,
                 double speed,
                 boolean pingpong)

Animation

public Animation(java.lang.String[] frames,
                 double speed,
                 boolean pingpong,
                 int increment)
Method Detail

stop

public void stop()

start

public void start()

reset

public void reset()

copy

public Animation copy()

getCurrentFrame

public java.lang.String getCurrentFrame()

animate

public java.lang.String animate(double speedmul)
Does one animation step and returns current image. Note that the function returns the frame before the state is being updated.