public class AnimationState
extends java.lang.Object
implements java.lang.Iterable<com.realtime.crossfire.jxclient.map.Location>
Animation
on a map.Constructor and Description |
---|
AnimationState(@NotNull com.realtime.crossfire.jxclient.animations.Animation animation,
int index,
@NotNull CfAnimationsMapListener mapListener,
@NotNull com.realtime.crossfire.jxclient.items.ItemSet itemSet,
@NotNull com.realtime.crossfire.jxclient.faces.FacesManager facesManager)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
allocate(int tag)
Adds this animation state to an item tag.
|
void |
allocate(@NotNull com.realtime.crossfire.jxclient.map.Location location)
Adds this animation state to a map
Location . |
void |
free(int tag)
Removes this animation state from an item tag.
|
void |
free(@NotNull com.realtime.crossfire.jxclient.map.Location location)
Removes this animation state from a map
Location . |
void |
freeAllLocations()
Removes this animation state from all map
Locations . |
@NotNull java.util.Iterator<com.realtime.crossfire.jxclient.map.Location> |
iterator() |
void |
scroll(int dx,
int dy,
int width,
int height)
Scrolls all map locations.
|
void |
setSpeed(int speed)
Sets the animation speed.
|
void |
setTickNo(int tickNo)
Sets the tick number.
|
void |
updateTickNo(int tickNo)
Sets the tick number and update affected faces.
|
public AnimationState(@NotNull @NotNull com.realtime.crossfire.jxclient.animations.Animation animation, int index, @NotNull @NotNull CfAnimationsMapListener mapListener, @NotNull @NotNull com.realtime.crossfire.jxclient.items.ItemSet itemSet, @NotNull @NotNull com.realtime.crossfire.jxclient.faces.FacesManager facesManager)
animation
- the animation to displayindex
- the initial face indexmapListener
- the map listener to notify of changesitemSet
- the item set to notify of changesfacesManager
- the faces manager to track for updated facespublic void setSpeed(int speed)
speed
- the new animation speed to setpublic void setTickNo(int tickNo)
tickNo
- the current tick numberpublic void updateTickNo(int tickNo)
tickNo
- the tick numberpublic void allocate(@NotNull @NotNull com.realtime.crossfire.jxclient.map.Location location)
Location
.location
- the map locationpublic void allocate(int tag)
tag
- the item tagpublic void free(@NotNull @NotNull com.realtime.crossfire.jxclient.map.Location location)
Location
.location
- the location to freepublic void freeAllLocations()
Locations
.public void free(int tag)
tag
- the item tag to free@NotNull public @NotNull java.util.Iterator<com.realtime.crossfire.jxclient.map.Location> iterator()
iterator
in interface java.lang.Iterable<com.realtime.crossfire.jxclient.map.Location>
public void scroll(int dx, int dy, int width, int height)
dx
- the x distance to scrolldy
- the y distance to scrollwidth
- the map widthheight
- the map height