Class MapScene

java.lang.Object
studio.magemonkey.codex.mccore.gui.MapScene

public class MapScene extends Object
Represents a collection of images with positions to keep track of when drawing to a MapBuffer. This allows for less network bandwith to be used while still keeping the incredible speed of MapBuffer. Use this instead of drawing directly to a MapBuffer to reduce network bandwidth used by map menus.
  • Constructor Details

    • MapScene

      public MapScene()
  • Method Details

    • add

      public void add(String key, MapObject obj)
      Adds an object to the scene
      Parameters:
      key - access key for the object
      obj - object to add to the scene
    • get

      public MapObject get(String key)
      Retrieves an object from the scene by key
      Parameters:
      key - access key the object was added with
      Returns:
      the scene object
    • clear

      public void clear()
      Clear the scene before moving onto a new menu
    • apply

      public void apply(MapBuffer buffer)
      Updates the scene, getting the "dirty" bounds