Ninjadoodle Posted January 10, 2018 Share Posted January 10, 2018 Hi @enpu I'm getting an error with the Pixi plugin (everything works fine with Canvas - I'm using Engine 2.0.2). Uncaught TypeError: Cannot read property 'addChild' of undefined at Container.addTo (src/plugin/pixi.js:36939) at Class.setupMenu (src/game/objects.js:229) at Class.init (main.js:100) at new Class (core.js:1046) at Class._setSceneNow (src/engine/system.js:382) at Class._run (src/engine/system.js:342) at core.js:864 at animate (core.js:960) It looks like it has something to do with containers. Quote Link to comment Share on other sites More sharing options...
enpu Posted January 10, 2018 Share Posted January 10, 2018 Can you show what's on (src/game/objects.js:229) ? Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted January 10, 2018 Author Share Posted January 10, 2018 This is the line it's referring to ... game.scene.bg = new game.Container().addTo(game.scene.tv); game.scene.bg = new game.Container().addTo(game.scene.tv); in context ... // MENU SETUP game.createClass('MenuSetup', { setupMenu: function() { // SETUP CONTAINERS game.scene.tv = new game.Container().addTo(game.scene.stage); game.scene.bg = new game.Container().addTo(game.scene.tv); game.scene.mg = new game.Container().addTo(game.scene.tv); game.scene.fg = new game.Container().addTo(game.scene.tv); game.scene.ui = new game.Container().addTo(game.scene.tv); // SETUP BACKGROUNDS game.scene.bgCircle = new game.Sprite('bgCircle.png'); game.scene.bgCircle.position.set(160, 160); game.scene.bgCircle.anchor.set(game.scene.bgCircle.width/2, game.scene.bgCircle.height/2); game.scene.bgCircle.addTo(game.scene.bg); }, Quote Link to comment Share on other sites More sharing options...
enpu Posted January 10, 2018 Share Posted January 10, 2018 Thanks will take a look on that Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.