import model.ModelManager;
import view.MapView;
import app.OpenRTSApplication;

import com.jme3.bullet.BulletAppState;
import com.jme3.math.Vector3f;
import com.jme3.niftygui.NiftyJmeDisplay;

import controller.battlefield.BattlefieldController;

public class Game extends OpenRTSApplication {

	public static void main(String[] args) {
		OpenRTSApplication.main(new Game());
	}

	@Override
	public void simpleInitApp() {
		BulletAppState bulletAppState = new BulletAppState();
		stateManager.attach(bulletAppState);
		bulletAppState.getPhysicsSpace().setGravity(new Vector3f(0, 0, -1));
		// stateManager.detach(bulletAppState);

		flyCam.setUpVector(new Vector3f(0, 0, 1));
		flyCam.setEnabled(false);

		MapView view = new MapView(rootNode, guiNode, bulletAppState.getPhysicsSpace(), assetManager, viewPort);

		NiftyJmeDisplay niftyDisplay = new NiftyJmeDisplay(assetManager, inputManager, audioRenderer, guiViewPort);
		BattlefieldController fieldCtrl = new BattlefieldController(view, niftyDisplay.getNifty(), inputManager, cam);

		niftyDisplay.getNifty().setIgnoreKeyboardEvents(true);
		// TODO: validation is needed to be sure everyting in XML is fine. see http://wiki.jmonkeyengine.org/doku.php/jme3:advanced:nifty_gui_best_practices
		// niftyDisplay.getNifty().validateXml("interface/screen.xml");
		niftyDisplay.getNifty().fromXml("interface/screen.xml", "editor");

		stateManager.attach(fieldCtrl);
		fieldCtrl.setEnabled(true);

		ModelManager.setNewBattlefield();

		guiViewPort.addProcessor(niftyDisplay);
	}
}

@@ -41,16 +41,54 @@
 apView;%0A
+import view.material.MaterialManager;%0A
 import a
@@ -736,16 +736,65 @@
 alse);%0A%0A
+%09%09MaterialManager.setAssetManager(assetManager);%0A
 %09%09MapVie

Set the assets manager for the example application