1 decade ago by gxxaxx
I am having a little difficulty with initializing some of my entities because they rely upon other objects that are initialized in the main.init()
Using the firebug debugger I can track when the init functions are being called and it looks like some (or all?) of the entity init functions are called before main.
How should this be handled?
I could use a postinit call in my update function.
But, it seems like I must be doing something fundamentally wrong to require this kind of workaround.
Thanks for any clues.
Using the firebug debugger I can track when the init functions are being called and it looks like some (or all?) of the entity init functions are called before main.
How should this be handled?
I could use a postinit call in my update function.
update: function() {
if (this.postinit) {
// do init stuff
postinit = false;
}
// update code
}
But, it seems like I must be doing something fundamentally wrong to require this kind of workaround.
Thanks for any clues.
