noob question:
i want to create a class to take care of importing and loading a model and texture to create a generally useable object outside of my main class (which extends SimpleApplication) and create a constructor in my main class to create an instance of that class in my app.
for example:
[java]
public class MyClass extends SimpleApplication
[/java]
and
[java]
public class Vehicle
[/java]
how would i gain the use of AssetManager in my Vehicle class without having to extend SimpleApplication?
or,
how would i instruct Vehicle to use the AssetManager of whichever subclass of SimpleApplication that called it?
You pass a reference to the application or just the assetManager in the constructor of your other class and then set a field in that class to it so you can access it.
perfect, thanks normen!
i WILL get this “java” thing down.