9 years ago by razare2016
In my main game I have:
This works:
This does not work:
The reason I try to use the 2nd one, is that the first one I do not trust. I think I'm doing it wrong because it seems to me this is creating a brand new game object? Wouldn't I want to reference the original game object?
But how would I do that deep down inside of a code which does not include the game.main asset, because that would be circular?
ig.MyGame = ig.Game.extend({ .... // and so on
This works:
ig.Game.loadLevel(LevelDung1);
This does not work:
ig.MyGame.loadLevel(LevelDung1);
The reason I try to use the 2nd one, is that the first one I do not trust. I think I'm doing it wrong because it seems to me this is creating a brand new game object? Wouldn't I want to reference the original game object?
But how would I do that deep down inside of a code which does not include the game.main asset, because that would be circular?