Jump to content

Cannot read property of 'graphics' or null


grumpygamer
 Share

Recommended Posts

Hello,

in an attempt to create a fading layer I've put these two lines of code together:

window.onload = function() {    var game = new Phaser.Game(window.innerWidth, window.innerHeight, Phaser.AUTO);    game.add.graphics(0, 0);          }

that by itself throws the error in the subject:

Cannot read property of 'graphics' or null.

 

If I log game I get the object so not sure what's wrong.

Thanks for any advice.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...