Class CfAnimations
java.lang.Object
com.realtime.crossfire.jxclient.map.CfAnimations
Manages a set of animated faces.
-
Constructor Summary
ConstructorsConstructorDescriptionCfAnimations(@NotNull ItemSet itemSet, @NotNull FacesManager facesManager, @NotNull Animations animations) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a visible map animation.voidmapClear()Forgets all map animations.voidmapRemove(int x, int y) Removes all visible map animations for a tile.voidRemoves a visible map animation.voidmapScroll(int dx, int dy) Scrolls the map animations.voidmapSetSize(int mapWidth, int mapHeight) Updates the map size.voidmapUpdateSpeed(@NotNull Location location, int speed) Updates the map animation speed value.voidsetMapListener(@NotNull CfAnimationsMapListener mapListener) Sets theCfAnimationsMapListenerto notify of changes.voidtick(int tickNo) Processes a tick command.
-
Constructor Details
-
CfAnimations
public CfAnimations(@NotNull @NotNull ItemSet itemSet, @NotNull @NotNull FacesManager facesManager, @NotNull @NotNull Animations animations) Creates a new instance.- Parameters:
itemSet- the item set to notify of changesfacesManager- the faces manager to track for updated facesanimations- the global animations instance
-
-
Method Details
-
setMapListener
Sets theCfAnimationsMapListenerto notify of changes.- Parameters:
mapListener- the listener to notify
-
mapClear
public void mapClear()Forgets all map animations. -
mapAdd
public void mapAdd(@NotNull @NotNull Location location, @NotNull @NotNull Animation animation, int type) Adds a visible map animation.- Parameters:
location- the location to animateanimation- the animation to displaytype- the animation type
-
mapRemove
public void mapRemove(int x, int y) Removes all visible map animations for a tile.- Parameters:
x- the x-coordinate to un-animatey- the y-coordinate to un-animate
-
mapRemove
Removes a visible map animation.- Parameters:
location- the location to un-animate
-
mapUpdateSpeed
Updates the map animation speed value.- Parameters:
location- the location to updatespeed- the new animation speed
-
mapScroll
public void mapScroll(int dx, int dy) Scrolls the map animations. Map animations scrolled off the visible are dropped.- Parameters:
dx- the x-distance to scrolldy- the y-distance to scroll
-
mapSetSize
public void mapSetSize(int mapWidth, int mapHeight) Updates the map size.- Parameters:
mapWidth- the map widthmapHeight- the map height
-
tick
public void tick(int tickNo) Processes a tick command.- Parameters:
tickNo- the current tick number
-