Jump to content

score tween


pranadevil
 Share

Recommended Posts

hi buddies,

 

 

i wonder if is possible to change the initial value in a tween  in order to get an endless score :

 

 

i tried 

 

////create function   tween2 goes from 0 to 500

points=500;

tween2 = game.add.tween(data).to( { score: points }, 2000);

 

and check in the update function when the tween is onComplete and call a function to alter the initial data value and the points value.

 

 

/// callback function when tween2 gets completed

 data.score = points   /// alter the initial value of score to points
 points  += 500; // increment points to 1000
 
 
not seems to work
 
 
any idea?
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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