public class Minimap extends java.lang.Object implements LinkedWithMap
Constructor and Description |
---|
Minimap(Camera camera,
int outputX,
int outputY)
Create a minimap.
|
Minimap(int outputX,
int outputY)
Create a minimap.
|
Modifier and Type | Method and Description |
---|---|
void |
buildTexture(GameView view)
Updates the minimap- Should only be done after changing the map.
|
boolean |
isNeedingRebuild() |
void |
needsRebuild() |
void |
onChunkChange(Chunk chunk)
called if a chunk's content (blocks) changes.
|
void |
onMapChange()
called if the map content (blocks) changes.
|
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.
|
public Minimap(int outputX, int outputY)
outputX
- the output-position of the minimap (distance to left)outputY
- the output-position of the minimap (distance from bottom)public Minimap(Camera camera, int outputX, int outputY)
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)public void setTrackedEnt(java.util.ArrayList<AbstractEntity> trackedEnt)
trackedEnt
- public void buildTexture(GameView view)
view
- public void render(GameView view)
view
- the view using this render methodpublic boolean toggleVisibility()
public boolean isNeedingRebuild()
public void needsRebuild()
public void setCamera(Camera camera)
camera
- public void onMapChange()
LinkedWithMap
onMapChange
in interface LinkedWithMap
public void onChunkChange(Chunk chunk)
LinkedWithMap
onChunkChange
in interface LinkedWithMap
chunk
- the chunk that changed