Java 类com.badlogic.gdx.backends.android.AndroidInput 实例源码

项目:libgdxcn    文件:AndroidControllers.java   
public AndroidControllers() {
    Gdx.app.addLifecycleListener(this);
    gatherControllers(false);
    setupEventQueue();
    ((AndroidInput)Gdx.input).addKeyListener(this);
    ((AndroidInputThreePlus)Gdx.input).addGenericMotionListener(this);

    // use InputManager on Android +4.1 to receive (dis-)connect events
    if(Gdx.app.getVersion() >= 16) {
        try {
            String className = "com.badlogic.gdx.controllers.android.ControllerLifeCycleListener";
            Class.forName(className).getConstructor(AndroidControllers.class).newInstance(this);
        } catch(Exception e) {
            Gdx.app.log(TAG, "Couldn't register controller life-cycle listener");
        }
    }
}
项目:thunderboard-android    文件:GdxDemoActivity.java   
@Override
public AndroidInput getInput() {
    return input;
}
项目:shadow-engine    文件:OuyaBackend.java   
@Override
public AndroidInput getGdxInput() {
    return new OuyaInput(Gdx.app, ((Activity)Gdx.app), ((AndroidGraphics)Gdx.graphics).getView(), cfgApp);
}
项目:shadow-engine    文件:AndroidBackend.java   
public AndroidInput getGdxInput() {
    return null;
}