cant quite figure out how tween text using phaser. code:
text1 = "home"; textstyle1 = {font: '150px tahoma', fill:'#ffffff', align: 'center'}; textholder1 = game.add.text(0,0,text1,textstyle1); texttween1 = game.add.tween(text1); texttween1.to({x:1000},5000, 'linear',true, 0);
i trying text move.
your tween added string of text. need instead add tween phaser.text
object, textholder1
.
var texttween1 = game.add.tween(textholder1); texttween1.to({ x: 1000 }, 5000, phaser.easing.linear.none, true, 0);
i might recommend switching tween definition phaser.easing.linear.none
instead of 'linear'
, did above. doesn't impact functionality, might down road.
simple mistake, easiest overlook. :)
Comments
Post a Comment