Arlefreak Posted August 20, 2013 Share Posted August 20, 2013 So I'm new to this, i have achived to do this, but i can't get the sprite to jump correctly, i was trying this metod but i can't find a elapsed function, any way to ahive this? PD: No pressure, but any news about 1.0 ? I'm looking forward to ir great work BTWPD: Sorry for the bad english. Link to comment Share on other sites More sharing options...
haden Posted August 22, 2013 Share Posted August 22, 2013 there is :game.time.elapsedbut it's not being updated in the current version of Phaser. In the meantime what you can do is to use:jumpStart = game.time.now;this will give you the time at the start of the jump, and:_jump = game.time.elapsedSince(jumpStart)will give you the elapsed time since the start of the jump. I believe it has the same effect of "_jump += FlxG.elapsed;" Arlefreak 1 Link to comment Share on other sites More sharing options...
rich Posted August 25, 2013 Share Posted August 25, 2013 game.time.delta or game.time.physicsElapsed is probably what you're after (if using the values for jump math like above) I'm going to remove game.time.elapsed to avoid confusion.. or do some renaming to make it more clear anyway, sorry about that! NateTheGreatt 1 Link to comment Share on other sites More sharing options...
Recommended Posts