Jump to content

just trying to click in a image with yeoman generator...


x2l2
 Share

Recommended Posts

I made a little test with yeoman generator...

 

I use createMultiple to create 30 objects and use :

Game.prototype = {    create: function () {            this.cards = this.add.group();      this.cards.createMultiple( 30, 'card');      this.cards.setAll('inputEnabled',true);      this.cards.setAll('input.useHandCursor',true);      ...

that works without problem, I can set an event and it make all that i want , but them in try this  :

Game.prototype = {    create: function () {           this.cards = this.add.group();      this.cards.createMultiple( 30, 'card');      this.cards.setAll('inputEnabled',true);      this.cards.setAll('input.useHandCursor',true);            this.logo = this.add.sprite( 0,0 , 'logo');      this.logo.inputEnable = true;      this.logo.input.useHandCursor = true;      this.logo.onInputDown.add( this.something, this);      ...

and get errors like :

Uncaught TypeError: Cannot set property 'useHandCursor' of null

Uncaught TypeError: Cannot read property 'add' of undefined

what the hell is going on?
 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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