@garnaout said:
I am not sure what she's trying to accomplish but for me I have a Visualizer class that extends SimpleApplication and an Animation class that takes care of the animation and adapters that use these two classes. I dont have a game though, I am animating a trace file for my simulator so for me I need one visualizer that is contained in an adapter (I have MANY adapters). I don't think her design is necessarily flawed, I know mine is not. But in my case I don't want to have the main class that extends simpleApplication (Visualizer) call the other class from it but vice versa.
The big difference here is that you seem to know what you're doing. Homsi OTOH... not so much. Not trying to be disrespectful but previous threads indicated that.
Well regardless the thread sleep thing worked!! Is there anyway to be able to tell when the app initiated without putting a random number in thread. Sleep()?
His design is flawed ^^ Attaching things from any other but the render thread is simply wrong. And waiting or polling for the application to start is abysmal.
[java]
while(visualizer.getAssetManager() == null)
{
// let it sleep for a short time
}
[/java]
If you do that it a) means that you want to do stuff with the application from another thread but the render thread and b) it means you don't know how to simply trigger something when simpleInit() is called, which gives you the exact moment the application is ready.