1 decade ago by Aitor
I want to have some general properties for my game that can be accesed from anywhere, and I thought that the best Idea is to put them in the game object (defined in main.js). I tried to put 'game.main' in the requires function of my entity and then accesing the game object like this: MyGame.font.draw("Test",50,50); but I get this error:
I'm still new to javascript (It's the first scripting language I learn) so If there is a better way to achieve this please tell me. Thanks in advance
uncaught exception: Unresolved (circular?) dependencies. Most likely there's a name/path mismatch for one of the listed modules: game.main (requires: game.entities.copter, game.levels.main) game.levels.main (requires: game.entities.copter) game.entities.copter (requires: game.main)
I'm still new to javascript (It's the first scripting language I learn) so If there is a better way to achieve this please tell me. Thanks in advance