|
|
@ -100,11 +100,8 @@ public class NiftyJmeDisplay implements SceneProcessor { |
|
|
|
|
|
|
|
|
|
|
|
soundDev = new SoundDeviceJme(assetManager, audioRenderer); |
|
|
|
soundDev = new SoundDeviceJme(assetManager, audioRenderer); |
|
|
|
renderDev = new RenderDeviceJme(this); |
|
|
|
renderDev = new RenderDeviceJme(this); |
|
|
|
inputSys = new InputSystemJme(inputManager); |
|
|
|
inputSys = new InputSystemJme(); |
|
|
|
if (inputManager != null) { |
|
|
|
|
|
|
|
inputManager.addRawInputListener(inputSys); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nifty = new Nifty(renderDev, soundDev, inputSys, new TimeProvider()); |
|
|
|
nifty = new Nifty(renderDev, soundDev, inputSys, new TimeProvider()); |
|
|
|
inputSys.setNifty(nifty); |
|
|
|
inputSys.setNifty(nifty); |
|
|
|
|
|
|
|
|
|
|
@ -116,6 +113,10 @@ public class NiftyJmeDisplay implements SceneProcessor { |
|
|
|
public void initialize(RenderManager rm, ViewPort vp) { |
|
|
|
public void initialize(RenderManager rm, ViewPort vp) { |
|
|
|
this.renderManager = rm; |
|
|
|
this.renderManager = rm; |
|
|
|
renderDev.setRenderManager(rm); |
|
|
|
renderDev.setRenderManager(rm); |
|
|
|
|
|
|
|
if (inputManager != null) { |
|
|
|
|
|
|
|
inputSys.setInputManager(inputManager); |
|
|
|
|
|
|
|
inputManager.addRawInputListener(inputSys); |
|
|
|
|
|
|
|
} |
|
|
|
inited = true; |
|
|
|
inited = true; |
|
|
|
this.vp = vp; |
|
|
|
this.vp = vp; |
|
|
|
this.renderer = rm.getRenderer(); |
|
|
|
this.renderer = rm.getRenderer(); |
|
|
@ -189,7 +190,6 @@ public class NiftyJmeDisplay implements SceneProcessor { |
|
|
|
if (inputManager != null) { |
|
|
|
if (inputManager != null) { |
|
|
|
inputManager.removeRawInputListener(inputSys); |
|
|
|
inputManager.removeRawInputListener(inputSys); |
|
|
|
} |
|
|
|
} |
|
|
|
// nifty.exit();
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|