Class Minimap
- java.lang.Object
-
- com.bombinggames.wurfelengine.extension.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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildTexture(GameView view)
Updates the minimap- Should only be done after changing the map.boolean
handleMessage(com.badlogic.gdx.ai.msg.Telegram msg)
boolean
isNeedingRebuild()
void
needsRebuild()
void
render(GameView view)
Renders the Minimap.void
setCamera(Camera camera)
Set a camera which will be represented on the minimap.void
setTrackedEnt(java.util.ArrayList<AbstractEntity> trackedEnt)
boolean
toggleVisibility()
Toggle between visible and invisible.
-
-
-
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 minimapoutputX
- 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 interfacecom.badlogic.gdx.ai.msg.Telegraph
-
-