org.xith3d.resources
Class LoadingPhaseController

java.lang.Object
  extended by org.xith3d.loop.opscheduler.impl.ScheduledOperationImpl
      extended by org.xith3d.resources.LoadingPhaseController
All Implemented Interfaces:
ScheduledOperation, Updatable

public abstract class LoadingPhaseController
extends ScheduledOperationImpl

This class helps you to load resources within a separate thread while still controlling a loading screen.


Constructor Summary
LoadingPhaseController(RenderLoop renderLoop, float reducedMaxFPS, ResourceLoader resLoader, LoadingScreenUpdater loadingScreenUpdater, ResourceBagReceiver resBagReceiver)
           
 
Method Summary
protected  void destroy()
           
protected abstract  ResourceBag load(ResourceLoader resLoader, LoadingScreenUpdater loadingScreenUpdater)
          This method is executed within a separate Thread.
protected  float reduceMaxFPS(float reducedMaxFPS, RenderLoop renderLoop)
           
protected  void restoreMaxFPS(float oldMaxFPS, RenderLoop renderLoop)
           
 void update(long gameTime, long frameTime, UpdatingThread.TimingMode timingMode)
          Updates this Updatable object.
 
Methods inherited from class org.xith3d.loop.opscheduler.impl.ScheduledOperationImpl
isAlive, isPersistent, setAlive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadingPhaseController

public LoadingPhaseController(RenderLoop renderLoop,
                              float reducedMaxFPS,
                              ResourceLoader resLoader,
                              LoadingScreenUpdater loadingScreenUpdater,
                              ResourceBagReceiver resBagReceiver)
Method Detail

reduceMaxFPS

protected float reduceMaxFPS(float reducedMaxFPS,
                             RenderLoop renderLoop)

restoreMaxFPS

protected void restoreMaxFPS(float oldMaxFPS,
                             RenderLoop renderLoop)

load

protected abstract ResourceBag load(ResourceLoader resLoader,
                                    LoadingScreenUpdater loadingScreenUpdater)
This method is executed within a separate Thread.

Parameters:
resLoader -
loadingScreenUpdater -
Returns:
the ResourceBag filled with the loaded resources.

destroy

protected void destroy()

update

public void update(long gameTime,
                   long frameTime,
                   UpdatingThread.TimingMode timingMode)
Description copied from interface: Updatable
Updates this Updatable object.

Parameters:
gameTime - the gameTime in Milliseconds
frameTime - the frameTime in Milliseconds (needed time for the last frame)
timingMode - the TimingMode to use for frameTime.