Jump to content

render texture trail with time delay (in a loop) issue


wizzard262
 Share

Recommended Posts

I want to make a sprite cross the screen and leave a trail but do slowly (as in one of the main website examples: render texture trail) 
I'm running this in a loop, changing the xPos and yPos each  time.

game.time.events.add(Phaser.Timer.SECOND * 0.2, function () { gameAddRenderTexture.renderXY(gameMakeSprite, xPos,yPos, false); }, this);

but it doesn't work :(

 

I tried passing in gameAddRenderTexture & gameMakeSprite but no luck (both are global vars)

 

any ideas?

I'm thinking this is some general javascript by ref / by val type thing but I can't find any answers.

thanks

 

Steve

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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