Jump to content

group.setAll/group.setProperty new behavior on v2.0.4?


baba
 Share

Recommended Posts

(version: 2.0.4)

Phaser.Group.prototype.setProperty will not work for keys which are from prototype chain of the given child.
 

eg 

sprite = game.world.create(0,0,'foo');game.world.setAll('inputEnabled', true); sprite.inputEnabled === true; //=>false(v2.0.4); true(v2.0.3)

I read the source and found that... 
-----

 

(refer to... v2.0.4 "Mos Shirare" - Built: Tue Apr 29 2014 22:39:37)

In Phaser.Group.prototype.setProperty()

if (len === 1 && child.hasOwnProperty(key[0])) ...

// no-op if child does not 'own' the key! :o  :o  poorSprite.hasOwnProperty('inputEnabled') => false... 

 

-----

 

(refer to...v2.0.3 "Allorallen" - Built: Fri Apr 11 2014 13:08:30)

In Phaser.Group.prototype.setProperty()

... if (operation === 0) { child[key[0]] = value; } ... 

-----

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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