public class TestWalkingChar extends SimpleApplication implements ActionListener, PhysicsCollisionListener, AnimEventListener
flyCam, fpsText, guiFont, guiNode, INPUT_MAPPING_CAMERA_POS, INPUT_MAPPING_EXIT, INPUT_MAPPING_HIDE_STATS, INPUT_MAPPING_MEMORY, rootNode, showSettings
assetManager, audioRenderer, cam, context, guiViewPort, inputEnabled, inputManager, joyInput, keyInput, listener, lostFocusBehavior, mouseInput, paused, prof, renderer, renderManager, settings, speed, stateManager, timer, touchInput, viewPort
Constructor and Description |
---|
TestWalkingChar() |
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 |
onAction(java.lang.String binding,
boolean value,
float tpf)
Called when an input to which this listener is registered to is invoked.
|
void |
onAnimChange(AnimControl control,
AnimChannel channel,
java.lang.String animName)
Invoked when a animation is set to play by the user on the given channel.
|
void |
onAnimCycleDone(AnimControl control,
AnimChannel channel,
java.lang.String animName)
Invoked when an animation "cycle" is done.
|
void |
simpleInitApp() |
void |
simpleUpdate(float tpf) |
getFlyByCamera, getGuiNode, getRootNode, getSpeed, initialize, isShowSettings, loadGuiFont, setDisplayFps, setDisplayStatView, setShowSettings, setSpeed, simpleRender, start, update
createCanvas, 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, stop
public static void main(java.lang.String[] args)
public void simpleInitApp()
simpleInitApp
in class SimpleApplication
public void simpleUpdate(float tpf)
simpleUpdate
in class SimpleApplication
public void onAction(java.lang.String binding, boolean value, float tpf)
ActionListener
onAction
in interface ActionListener
binding
- The name of the mapping that was invokedvalue
- True if the action is "pressed", false otherwisetpf
- The time per frame value.public void collision(PhysicsCollisionEvent event)
PhysicsCollisionListener
Do 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 PhysicsCollisionListener
event
- the event that occurred (not null, reusable)public void onAnimCycleDone(AnimControl control, AnimChannel channel, java.lang.String animName)
AnimEventListener
onAnimCycleDone
in interface AnimEventListener
control
- The control to which the listener is assigned.channel
- The channel being alteredanimName
- The new animation that is done.public void onAnimChange(AnimControl control, AnimChannel channel, java.lang.String animName)
AnimEventListener
onAnimChange
in interface AnimEventListener
control
- The control to which the listener is assigned.channel
- The channel being alteredanimName
- The new animation name set.