public Input(GameContainer gc) { // this.gc = gc; gc.getWindow().getCanvas().addKeyListener(this); gc.getWindow().getCanvas().addMouseListener(this); gc.getWindow().getCanvas().addMouseMotionListener(this); }
@Override public void dispose() { if (gameContainer == null) { return; } gameContainer.dispose(); }
@Override public void pause() { if (gameContainer == null) { return; } gameContainer.onPause(); }
@Override public void resume() { if (gameContainer == null) { return; } gameContainer.onResume(); }
@Override public void render() { if (gameContainer == null) { return; } gameContainer.render(); }
@Override public void interpolate(float alpha) { if (gameContainer == null) { return; } gameContainer.interpolate(alpha); }
@Override public void update(float delta) { if (gameContainer == null) { return; } gameContainer.update(delta); }
@Override public void resize(int width, int height) { if (gameContainer == null) { return; } gameContainer.resize(width, height); }
@Override public void create() { initialise(gameIdentifier); gameContainer.start(); }