Class Minimap

  • All Implemented Interfaces:
    com.badlogic.gdx.ai.msg.Telegraph


    public class Minimap
    extends java.lang.Object
    implements com.badlogic.gdx.ai.msg.Telegraph
    A minimap is a view that draws the map from top in a small window.
    • Constructor Summary

      Constructors 
      Constructor Description
      Minimap​(int outputX, int outputY)
      Create a minimap.
      Minimap​(Camera camera, int outputX, int outputY)
      Create a minimap.
    • Constructor Detail

      • Minimap

        public Minimap​(int outputX,
                       int outputY)
        Create a minimap. Visible by default.
        Parameters:
        outputX - the output-position of the minimap (distance to left)
        outputY - the output-position of the minimap (distance from bottom)
      • Minimap

        public Minimap​(Camera camera,
                       int outputX,
                       int outputY)
        Create a minimap. Visible by default.
        Parameters:
        camera - the camera wich should be represented on the minimap
        outputX - the output-position of the minimap (distance to left)
        outputY - the output-position of the minimap (distance from bottom)
    • Method Detail

      • setTrackedEnt

        public void setTrackedEnt​(java.util.ArrayList<AbstractEntity> trackedEnt)
        Parameters:
        trackedEnt -
      • buildTexture

        public void buildTexture​(GameView view)
        Updates the minimap- Should only be done after changing the map.
        Parameters:
        view -
      • render

        public void render​(GameView view)
        Renders the Minimap.
        Parameters:
        view - the view using this render method
      • toggleVisibility

        public boolean toggleVisibility​()
        Toggle between visible and invisible.
        Returns:
        The new visibility of the minimap. True= visible.
      • isNeedingRebuild

        public boolean isNeedingRebuild​()
        Returns:
      • needsRebuild

        public void needsRebuild​()
      • setCamera

        public void setCamera​(Camera camera)
        Set a camera which will be represented on the minimap.
        Parameters:
        camera -
      • handleMessage

        public boolean handleMessage​(com.badlogic.gdx.ai.msg.Telegram msg)
        Specified by:
        handleMessage in interface com.badlogic.gdx.ai.msg.Telegraph