Without more information… my guess is:
- you are very new to Java
- you see code examples that extend SimpleApplication that directly refer to a magic ‘assetManager’ and you don’t know where it comes from
SimpleApplication defines some fields that are available to subclasses. This is an ugly crutch that makes it easy to write tests but makes it very confusing to learn what’s happening.
If you have some other class that is not your main application but it needs things like AssetManager then you will have to pass a reference to those things to that class. For new Java developers, this invariably means trying a bunch of bad things. (For example, it’s quite common for new devs to then just have all of their classes extend SimpleApplication… which is wrong AND doesn’t solve the problem. “How many applications do you want in your application?” etc.)
I highly recommend finding some Java tutorials that teach the basics about object oriented programming. Do enough tutorials until you can understand where the magic ‘assetManager’ reference came from. Hopefully then you will understand how to get it to your own classes… and probably you will also then understand the nice things about app states and why they work the way they do.