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.TelegraphA 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 voidbuildTexture(GameView view)Updates the minimap- Should only be done after changing the map.booleanhandleMessage(com.badlogic.gdx.ai.msg.Telegram msg)booleanisNeedingRebuild()voidneedsRebuild()voidrender(GameView view)Renders the Minimap.voidsetCamera(Camera camera)Set a camera which will be represented on the minimap.voidsetTrackedEnt(java.util.ArrayList<AbstractEntity> trackedEnt)booleantoggleVisibility()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:
handleMessagein interfacecom.badlogic.gdx.ai.msg.Telegraph
-
-