Crossfire JXClient, Trunk
|
Public Member Functions | |
void | add (@NotNull final Location location, @NotNull final AnimationState animationState) |
void | clear () |
void | remove (@NotNull final Location location) |
void | scroll (final int dx, final int dy, final int width, final int height) |
void | updateSpeed (@NotNull final Location location, final int speed) |
Static Private Member Functions | |
static void | freeAnimationState (@Nullable final AnimationState animationState, @NotNull final Location location) |
Private Attributes | |
final Map< Location, AnimationState > | animations = new HashMap<>() |
Maintains AnimationState instances for map locations.
Definition at line 36 of file AnimationMap.java.
void com.realtime.crossfire.jxclient.map.AnimationMap.add | ( | @NotNull final Location | location, |
@NotNull final AnimationState | animationState | ||
) |
Adds a new AnimationState to a Location. If the location was not empty, the previous animation state is freed.
location | the location to add to |
animationState | the animation state to add |
Definition at line 58 of file AnimationMap.java.
References com.realtime.crossfire.jxclient.map.AnimationMap.animations, and com.realtime.crossfire.jxclient.map.AnimationMap.freeAnimationState().
Referenced by com.realtime.crossfire.jxclient.map.CfAnimations.mapAdd().
void com.realtime.crossfire.jxclient.map.AnimationMap.clear | ( | ) |
Forgets all state.
Definition at line 48 of file AnimationMap.java.
References com.realtime.crossfire.jxclient.map.AnimationMap.animations.
Referenced by com.realtime.crossfire.jxclient.map.CfAnimations.mapClear().
|
staticprivate |
Calls AnimationState#free(Location).
animationState | the instance to call free()
null
|
location | the location to pass |
Definition at line 110 of file AnimationMap.java.
Referenced by com.realtime.crossfire.jxclient.map.AnimationMap.add(), and com.realtime.crossfire.jxclient.map.AnimationMap.remove().
void com.realtime.crossfire.jxclient.map.AnimationMap.remove | ( | @NotNull final Location | location | ) |
Clears a Location.
location | the location to clear |
Definition at line 67 of file AnimationMap.java.
References com.realtime.crossfire.jxclient.map.AnimationMap.animations, and com.realtime.crossfire.jxclient.map.AnimationMap.freeAnimationState().
Referenced by com.realtime.crossfire.jxclient.map.CfAnimations.mapRemove().
void com.realtime.crossfire.jxclient.map.AnimationMap.scroll | ( | final int | dx, |
final int | dy, | ||
final int | width, | ||
final int | height | ||
) |
Scrolls all locations.
dx | the x distance to scroll |
dy | the y distance to scroll |
width | the map width |
height | the map height |
Definition at line 93 of file AnimationMap.java.
References com.realtime.crossfire.jxclient.map.AnimationMap.animations.
Referenced by com.realtime.crossfire.jxclient.map.CfAnimations.mapScroll().
void com.realtime.crossfire.jxclient.map.AnimationMap.updateSpeed | ( | @NotNull final Location | location, |
final int | speed | ||
) |
Updates the animation speed value of a Location.
location | the location to update |
speed | the new animation speed |
Definition at line 76 of file AnimationMap.java.
References com.realtime.crossfire.jxclient.map.AnimationMap.animations, and com.realtime.crossfire.jxclient.map.AnimationState.setSpeed().
Referenced by com.realtime.crossfire.jxclient.map.CfAnimations.mapUpdateSpeed().
|
private |
The active AnimationState instances. Maps map Location to
instance.
Definition at line 43 of file AnimationMap.java.
Referenced by com.realtime.crossfire.jxclient.map.AnimationMap.add(), com.realtime.crossfire.jxclient.map.AnimationMap.clear(), com.realtime.crossfire.jxclient.map.AnimationMap.remove(), com.realtime.crossfire.jxclient.map.AnimationMap.scroll(), and com.realtime.crossfire.jxclient.map.AnimationMap.updateSpeed().