SimpleInitApp() vs Initialize()

Sorry …

Need a coffe …



Hello all!



Can anybody tell me the difference between calling a function in SimpleInitApp() and doing the same in Initialize()?



I looked at the jME source code and Initialize() just does a couple of initializations and then calls SimpleInitApp().

I figured this


[java] @Override

public void simpleUpdate(float tpf) {

loadHintText();

}[/java]



would be the same as this

[java]@Override

public void simpleUpdate(float tpf) {

}



@Override

public void initialize() {

super.initialize();

loadHintText();

}[/java]



But it’s not.

On the first case I get a nice letter and on the second I get a fat wobbly letter. Why?



Here is the code:


[java]public void loadHintText() {

hintText = new BitmapText(guiFont, false);

hintText.setSize(guiFont.getCharSet().getRenderedSize());

hintText.setLocalTranslation(0, getCamera().getHeight(), 0);

hintText.setText(“Hit T to switch to wireframe, P to switch to tri-planar texturing”);

guiNode.attachChild(hintText);

}[/java]

after looking at the source, doing it in simpleInitApp() and initialize as you “described” would work. But your calling it in simpleUpdate(float tpf) not simpleInitApp, which is going to keep layering bitmaps over each other



edit: ok go get your coffee :stuck_out_tongue: