public abstract class BaseGameActivity extends BaseActivity implements IGameInterface, IRendererListener
IGameInterface.OnCreateResourcesCallback, IGameInterface.OnCreateSceneCallback, IGameInterface.OnPopulateSceneCallback| Modifier and Type | Field and Description |
|---|---|
protected Engine |
mEngine |
protected RenderSurfaceView |
mRenderSurfaceView |
| Constructor and Description |
|---|
BaseGameActivity() |
doAsync, doAsync, doAsync, doProgressAsync, doProgressAsync, toastOnUIThread, toastOnUIThreadclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonCreateEngineOptions, onCreateResources, onCreateScene, onPopulateSceneprotected Engine mEngine
protected RenderSurfaceView mRenderSurfaceView
protected void onCreate(android.os.Bundle pSavedInstanceState)
public Engine onCreateEngine(EngineOptions pEngineOptions)
onCreateEngine in interface IGameInterfacepublic void onSurfaceCreated(GLState pGLState)
onSurfaceCreated in interface IRendererListenerpublic void onSurfaceChanged(GLState pGLState, int pWidth, int pHeight)
onSurfaceChanged in interface IRendererListenerprotected void onCreateGame()
public void onGameCreated()
onGameCreated in interface IGameInterfaceprotected void onResume()
public void onResumeGame()
onResumeGame in interface IGameInterfacepublic void onWindowFocusChanged(boolean pHasWindowFocus)
public void onReloadResources()
onReloadResources in interface IGameInterfaceprotected void onPause()
public void onPauseGame()
onPauseGame in interface IGameInterfaceprotected void onDestroy()
public void onDestroyResources()
throws java.lang.Exception
onDestroyResources in interface IGameInterfacejava.lang.Exceptionpublic void onGameDestroyed()
onGameDestroyed in interface IGameInterfacepublic Engine getEngine()
public boolean isGamePaused()
public boolean isGameRunning()
public boolean isGameLoaded()
public VertexBufferObjectManager getVertexBufferObjectManager()
public TextureManager getTextureManager()
public FontManager getFontManager()
public ShaderProgramManager getShaderProgramManager()
public SoundManager getSoundManager()
public MusicManager getMusicManager()
protected void onSetContentView()
public void runOnUpdateThread(java.lang.Runnable pRunnable)
Engine.runOnUpdateThread(Runnable)public void runOnUpdateThread(java.lang.Runnable pRunnable,
boolean pOnlyWhenEngineRunning)
protected static android.widget.FrameLayout.LayoutParams createSurfaceViewLayoutParams()
protected void enableVibrator()
protected void enableLocationSensor(ILocationListener pLocationListener, LocationSensorOptions pLocationSensorOptions)
Engine#enableLocationSensor(Context, ILocationListener, LocationSensorOptions)}protected void disableLocationSensor()
Engine#disableLocationSensor(Context)}protected boolean enableAccelerationSensor(IAccelerationListener pAccelerationListener)
Engine#enableAccelerationSensor(Context, IAccelerationListener)}protected boolean enableAccelerationSensor(IAccelerationListener pAccelerationListener, AccelerationSensorOptions pAccelerationSensorOptions)
Engine#enableAccelerationSensor(Context, IAccelerationListener, AccelerationSensorOptions)}protected boolean disableAccelerationSensor()
Engine#disableAccelerationSensor(Context)}protected boolean enableOrientationSensor(IOrientationListener pOrientationListener)
Engine#enableOrientationSensor(Context, IOrientationListener)}protected boolean enableOrientationSensor(IOrientationListener pOrientationListener, OrientationSensorOptions pLocationSensorOptions)
Engine#enableOrientationSensor(Context, IOrientationListener, OrientationSensorOptions)}protected boolean disableOrientationSensor()
Engine#disableOrientationSensor(Context)}