Class LightMapModelTracker<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>


  • public class LightMapModelTracker<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>
    extends java.lang.Object
    Tracks a MapModel for light emitting game objects. Whenever such a game object is added to, removed from, or modified while on the map, all affected map squares are updated.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void mapSizeChanging​(@NotNull Size2D newSize, @NotNull Size2D oldSize)
      Called whenever the tracked map is about to change size.
      void mapSquaresChanged​(@NotNull java.lang.Iterable<MapSquare<G,​A,​R>> mapSquares)
      Called whenever some game objects have changed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LightMapModelTracker

        public LightMapModelTracker​(@NotNull
                                    @NotNull MapModel<G,​A,​R> mapModel)
        Creates a new instance.
        Parameters:
        mapModel - the tracked map model
    • Method Detail

      • mapSizeChanging

        public void mapSizeChanging​(@NotNull
                                    @NotNull Size2D newSize,
                                    @NotNull
                                    @NotNull Size2D oldSize)
        Called whenever the tracked map is about to change size.
        Parameters:
        newSize - the new map size
        oldSize - the current map size
      • mapSquaresChanged

        public void mapSquaresChanged​(@NotNull
                                      @NotNull java.lang.Iterable<MapSquare<G,​A,​R>> mapSquares)
        Called whenever some game objects have changed.
        Parameters:
        mapSquares - the map square that contain changed game objects