| Constructor and Description |
|---|
AnimationState(@NotNull Animation animation,
int index,
@NotNull CfAnimationsMapListener mapListener,
@NotNull ItemSet itemSet,
@NotNull 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 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 Location location)
Removes this animation state from a map
Location. |
void |
freeAllLocations()
Removes this animation state from all map
Locations. |
@NotNull java.util.Iterator<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 Animation animation,
int index,
@NotNull
@NotNull CfAnimationsMapListener mapListener,
@NotNull
@NotNull ItemSet itemSet,
@NotNull
@NotNull 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 Location location)
Location.location - the map locationpublic void allocate(int tag)
tag - the item tagpublic void free(@NotNull
@NotNull 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<Location> iterator()
iterator in interface java.lang.Iterable<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