public class CfAnimations
extends java.lang.Object
Constructor and Description |
---|
CfAnimations(@NotNull ItemSet itemSet,
@NotNull FacesManager facesManager,
@NotNull Animations animations)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
mapAdd(@NotNull Location location,
@NotNull Animation animation,
int type)
Adds a visible map animation.
|
void |
mapClear()
Forgets all map animations.
|
void |
mapRemove(int x,
int y)
Removes all visible map animations for a tile.
|
void |
mapRemove(@NotNull Location location)
Removes a visible map animation.
|
void |
mapScroll(int dx,
int dy)
Scrolls the map animations.
|
void |
mapSetSize(int mapWidth,
int mapHeight)
Updates the map size.
|
void |
mapUpdateSpeed(@NotNull Location location,
int speed)
Updates the map animation speed value.
|
void |
setMapListener(@NotNull CfAnimationsMapListener mapListener)
Sets the
CfAnimationsMapListener to notify of changes. |
void |
tick(int tickNo)
Processes a tick command.
|
public CfAnimations(@NotNull @NotNull ItemSet itemSet, @NotNull @NotNull FacesManager facesManager, @NotNull @NotNull Animations animations)
itemSet
- the item set to notify of changesfacesManager
- the faces manager to track for updated facesanimations
- the global animations instancepublic void setMapListener(@NotNull @NotNull CfAnimationsMapListener mapListener)
CfAnimationsMapListener
to notify of changes.mapListener
- the listener to notifypublic void mapClear()
public void mapAdd(@NotNull @NotNull Location location, @NotNull @NotNull Animation animation, int type)
location
- the location to animateanimation
- the animation to displaytype
- the animation typepublic void mapRemove(int x, int y)
x
- the x-coordinate to un-animatey
- the y-coordinate to un-animatepublic void mapRemove(@NotNull @NotNull Location location)
location
- the location to un-animatepublic void mapUpdateSpeed(@NotNull @NotNull Location location, int speed)
location
- the location to updatespeed
- the new animation speedpublic void mapScroll(int dx, int dy)
dx
- the x-distance to scrolldy
- the y-distance to scrollpublic void mapSetSize(int mapWidth, int mapHeight)
mapWidth
- the map widthmapHeight
- the map heightpublic void tick(int tickNo)
tickNo
- the current tick number