Crossfire JXClient, Trunk
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
com.realtime.crossfire.jxclient.map.AnimationSet Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.map.AnimationSet:
Collaboration graph

Public Member Functions

void add (final int tag, @NotNull final AnimationState animationState)
 
Collection< AnimationStategetAllAnimationStates ()
 
void remove (final int tag)
 
void updateSpeed (final int tag, final int speed)
 

Static Private Member Functions

static void freeAnimationState (@Nullable final AnimationState animationState, final int tag)
 

Private Attributes

final Map< Integer, AnimationStateanimations = new HashMap<>()
 

Detailed Description

Maintains AnimationState instances for item tag values.

Author
Andreas Kirschbaum

Definition at line 36 of file AnimationSet.java.

Member Function Documentation

◆ add()

void com.realtime.crossfire.jxclient.map.AnimationSet.add ( final int  tag,
@NotNull final AnimationState  animationState 
)

Adds a new AnimationState for an item tag. If the location was not empty, the previous animation state is freed.

Parameters
tagthe item tag to add to
animationStatethe animation state to add

Definition at line 51 of file AnimationSet.java.

References com.realtime.crossfire.jxclient.map.AnimationSet.animations, and com.realtime.crossfire.jxclient.map.AnimationSet.freeAnimationState().

Referenced by com.realtime.crossfire.jxclient.map.CfAnimations.tagAdd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeAnimationState()

static void com.realtime.crossfire.jxclient.map.AnimationSet.freeAnimationState ( @Nullable final AnimationState  animationState,
final int  tag 
)
staticprivate

Calls AnimationState#free(Location).

Parameters
animationStatethe instance to call
free()
on or
null
to do nothing
tagthe item tag to pass

Definition at line 95 of file AnimationSet.java.

Referenced by com.realtime.crossfire.jxclient.map.AnimationSet.add(), and com.realtime.crossfire.jxclient.map.AnimationSet.remove().

Here is the caller graph for this function:

◆ getAllAnimationStates()

Collection<AnimationState> com.realtime.crossfire.jxclient.map.AnimationSet.getAllAnimationStates ( )

Returns all AnimationState instances.

Returns
the instances; it is read-only; it is valid until this instance is modified the next time

Definition at line 85 of file AnimationSet.java.

References com.realtime.crossfire.jxclient.map.AnimationSet.animations.

Referenced by com.realtime.crossfire.jxclient.map.CfAnimations.mapClear().

Here is the caller graph for this function:

◆ remove()

void com.realtime.crossfire.jxclient.map.AnimationSet.remove ( final int  tag)

Clears an item tag.

Parameters
tagthe item tag to clear

Definition at line 60 of file AnimationSet.java.

References com.realtime.crossfire.jxclient.map.AnimationSet.animations, and com.realtime.crossfire.jxclient.map.AnimationSet.freeAnimationState().

Referenced by com.realtime.crossfire.jxclient.map.CfAnimations.tagRemove().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSpeed()

void com.realtime.crossfire.jxclient.map.AnimationSet.updateSpeed ( final int  tag,
final int  speed 
)

Updates the animation speed value of an item tag.

Parameters
tagthe item tag to update
speedthe new animation speed

Definition at line 69 of file AnimationSet.java.

References com.realtime.crossfire.jxclient.map.AnimationSet.animations, and com.realtime.crossfire.jxclient.map.AnimationState.setSpeed().

Here is the call graph for this function:

Member Data Documentation

◆ animations

final Map<Integer, AnimationState> com.realtime.crossfire.jxclient.map.AnimationSet.animations = new HashMap<>()
private

The documentation for this class was generated from the following file: