com.realtime.crossfire.jxclient.animations
Class Animation

java.lang.Object
  extended by com.realtime.crossfire.jxclient.animations.Animation

public class Animation
extends java.lang.Object

Manages animations received from the server. Animations are uniquely identified by an animation id. Each animation consists of a list of faces.


Field Summary
private  int animationId
          The animation ID.
private  int[] faces
          The faces list of the animation.
private  int flags
          Flags for the animation; currently unused by the server.
 
Constructor Summary
Animation(int animationId, int flags, int[] faces)
          Creates a new instance.
 
Method Summary
 int getAnimationId()
          Returns the animation ID.
 int getFace(int index)
          Returns one face of this animation.
 int getFaces()
          Returns the number of faces of this animation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

animationId

private final int animationId
The animation ID.


faces

@NotNull
private final int[] faces
The faces list of the animation.


flags

private final int flags
Flags for the animation; currently unused by the server.

Constructor Detail

Animation

public Animation(int animationId,
                 int flags,
                 @NotNull
                 int[] faces)
Creates a new instance.

Parameters:
animationId - the animation ID
flags - flags for the animation; currently unused
faces - the faces list of the animation
Method Detail

getAnimationId

public int getAnimationId()
Returns the animation ID.

Returns:
the animation ID

getFace

public int getFace(int index)
Returns one face of this animation.

Parameters:
index - the face index
Returns:
the face

getFaces

public int getFaces()
Returns the number of faces of this animation.

Returns:
the number of faces