Alright, so I started developing a game, and I ran into my first problem. How can I access the main app settings if it is protected? Is there a method that allows me do this, or is it just not generally advised? I thought I was on the right track, initializing my local variables and assigning them through getters. My code (or where the problem lies) looks like this:
[java]public class StartState extends AbstractAppState{
private Node guiNode;
private Node rootNode;
private AssetManager assetManager;
private SimpleApplication app;
private Node localGuiNode;
private Picture startPic;
private AppSettings settings;
public StartState(SimpleApplication app){
this.app = (SimpleApplication) app;
this.rootNode = app.getRootNode();
this.guiNode = app.getGuiNode();
this.assetManager = app.getAssetManager();
this.settings = app.settings; //The protected problem comes here, because I know not of a method to get the settings
}[/java]
The reason I needed the settings because in the stateAttached I was going to simply attach a picture that fit the width and height of the screen to the guiNode. But to do that I need the settings.
Is there a method I missed in the javadocs? Or am I applying some bad programming practices?