Jump to content

_lastChild is undefined 2.2.2


BattyMilk
 Share

Recommended Posts

I'm upgrading a Phaser project from 2.0.5 to 2.2.2 and this no longer works:



this.myTween = game.add.tween(this.myLabel)

.to({y: game.world.centerY, alpha:1}, 1000, Phaser.Easing.Quadratic.In)

.to({alpha:0}, 500)

.start();

this.myTween._lastChild.onComplete.add(this.myFunction, this);

With


 


Uncaught TypeError: Cannot read property 'onComplete' of undefined


 


Searching the source, it seems all refs to _lastChild have been removed


 


What is the best way to handle this now?


Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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