public class UpdateLayer extends Layer implements LayerThread.ViewWatcherInterface
Modifier and Type | Class and Description |
---|---|
static interface |
UpdateLayer.Delegate
Fill in the delegate for callbacks
|
Modifier and Type | Field and Description |
---|---|
UpdateLayer.Delegate |
delegate |
float |
maxLag |
float |
minTime |
float |
moveDist |
layerThread
Constructor and Description |
---|
UpdateLayer(float moveDist,
float minTime,
UpdateLayer.Delegate delegate,
BaseController inMaplyControl) |
Modifier and Type | Method and Description |
---|---|
float |
getMaxLagTime()
How long the layer can go without a viewUpdated() call.
|
float |
getMinTime()
This minimum time before unique viewUpdated() calls.
|
void |
shutdown()
This method is called when a layer is to be removed.
|
void |
startLayer(LayerThread inLayerThread)
Once your layer is created and handed to the LayerThread, it needs to
actually be started on that layer.
|
void |
viewUpdated(ViewState newViewState)
This method is called when the view updates, but no more often then the minTime().
|
preSceneFlush
public UpdateLayer.Delegate delegate
public float moveDist
public float minTime
public float maxLag
public UpdateLayer(float moveDist, float minTime, UpdateLayer.Delegate delegate, BaseController inMaplyControl)
public void startLayer(LayerThread inLayerThread)
Layer
startLayer
in class Layer
public void shutdown()
Layer
If the MaplyController is shut down, you may not get this call and instead may simply be deleted.
public void viewUpdated(ViewState newViewState)
LayerThread.ViewWatcherInterface
viewUpdated
in interface LayerThread.ViewWatcherInterface
newViewState
- The new state for the view associated with the MaplyController.public float getMinTime()
LayerThread.ViewWatcherInterface
getMinTime
in interface LayerThread.ViewWatcherInterface
public float getMaxLagTime()
LayerThread.ViewWatcherInterface
getMaxLagTime
in interface LayerThread.ViewWatcherInterface