Jump to content

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


Recommended Posts

(version: 2.0.4)

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


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

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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