wizzard262 Posted December 8, 2014 Share Posted December 8, 2014 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 More sharing options...
eguneys Posted December 9, 2014 Share Posted December 9, 2014 You mean like this, http://examples.phaser.io/_site/view_full.html?d=display&f=render+texture+trail.js&t=render%20texture%20trail? Also could you share your whole code. eg: What is "gameAddRenderTexture.renderXY" Link to comment Share on other sites More sharing options...
Recommended Posts