Class CfAnimations

java.lang.Object
com.realtime.crossfire.jxclient.map.CfAnimations

public class CfAnimations extends Object
Manages a set of animated faces.
  • 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 changes
      facesManager - the faces manager to track for updated faces
      animations - the global animations instance
  • Method Details

    • setMapListener

      public void setMapListener(@NotNull @NotNull CfAnimationsMapListener mapListener)
      Sets the CfAnimationsMapListener to 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 animate
      animation - the animation to display
      type - 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-animate
      y - the y-coordinate to un-animate
    • mapRemove

      public void mapRemove(@NotNull @NotNull Location location)
      Removes a visible map animation.
      Parameters:
      location - the location to un-animate
    • mapUpdateSpeed

      public void mapUpdateSpeed(@NotNull @NotNull Location location, int speed)
      Updates the map animation speed value.
      Parameters:
      location - the location to update
      speed - 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 scroll
      dy - the y-distance to scroll
    • mapSetSize

      public void mapSetSize(int mapWidth, int mapHeight)
      Updates the map size.
      Parameters:
      mapWidth - the map width
      mapHeight - the map height
    • tick

      public void tick(int tickNo)
      Processes a tick command.
      Parameters:
      tickNo - the current tick number