8 years ago by kortes
Hello there! I just bought impact and working with it has been a blast so far. I'm about to create a multiplayer platformer for the browser.
How can I access properties set on my game.main module from my entities? The easy solution is to use ig.global or window. But is that the right way to do it?
Does entities know anything about the main game object?
Right now I boot my websocket up in my game's init(), and I'm about to emit the creation of the entity in its init() function. But the socket variable is local to the game.main module.
How can I access properties set on my game.main module from my entities? The easy solution is to use ig.global or window. But is that the right way to do it?
Does entities know anything about the main game object?
Right now I boot my websocket up in my game's init(), and I'm about to emit the creation of the entity in its init() function. But the socket variable is local to the game.main module.