public class TestCollisionListener extends SimpleApplication implements PhysicsCollisionListener
flyCam, fpsText, guiFont, guiNode, INPUT_MAPPING_CAMERA_POS, INPUT_MAPPING_EXIT, INPUT_MAPPING_HIDE_STATS, INPUT_MAPPING_MEMORY, rootNode, showSettingsassetManager, audioRenderer, cam, context, guiViewPort, inputEnabled, inputManager, joyInput, keyInput, listener, lostFocusBehavior, mouseInput, paused, prof, renderer, renderManager, settings, speed, stateManager, timer, touchInput, viewPort| Constructor and Description |
|---|
TestCollisionListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
collision(PhysicsCollisionEvent event)
Invoked when a collision happened in the PhysicsSpace.
|
static void |
main(java.lang.String[] args) |
void |
simpleInitApp() |
void |
simpleRender(RenderManager rm) |
void |
simpleUpdate(float tpf) |
getFlyByCamera, getGuiNode, getRootNode, getSpeed, initialize, isShowSettings, loadGuiFont, setDisplayFps, setDisplayStatView, setShowSettings, setSpeed, start, updatecreateCanvas, destroy, destroyInput, enqueue, enqueue, gainFocus, getAppProfiler, getAssetManager, getAudioRenderer, getCamera, getContext, getGuiViewPort, getInputManager, getListener, getLostFocusBehavior, getRenderer, getRenderManager, getStateManager, getTimer, getViewPort, handleError, isPauseOnLostFocus, loseFocus, requestClose, reshape, restart, runQueuedTasks, setAppProfiler, setAssetManager, setLostFocusBehavior, setPauseOnLostFocus, setSettings, setTimer, start, start, start, startCanvas, startCanvas, stop, stoppublic static void main(java.lang.String[] args)
public void simpleInitApp()
simpleInitApp in class SimpleApplicationpublic void simpleUpdate(float tpf)
simpleUpdate in class SimpleApplicationpublic void simpleRender(RenderManager rm)
simpleRender in class SimpleApplicationpublic void collision(PhysicsCollisionEvent event)
PhysicsCollisionListenerDo not retain the event object, as it will be reused after the collision() method returns. Copy any data you need during the collide() method.
collision in interface PhysicsCollisionListenerevent - the event that occurred (not null, reusable)