Hello,
I'm new into WADE and I must say it looks great!
I was watching the tutorials and particularly the Making HTML 5 games with WADE - part 2 provided by Clockwork Chilli and I want to have a delay before executing the moveTo function on an object for example:
this.onMoveComplete = function()
{
if (this.state == 'down')
{
this.state = 'up';
this.owner.moveTo(this.originalPosition.x, this.originalPosition.y - 40, 100);
}
else if (this.state == 'up')
{
this.state = 'down';
this.owner.moveTo(this.originalPosition.x, this.originalPosition.y + 50, 100);
}
};
This works fine since it doesn't have a delay, I tried this:
setTimeout(function() { jQuery(this.owner).moveTo(this.originalPosition.x, this.originalPosition.y - 40, 100) },3000 );
which doesn't work. Any ideas?
P.S My code is exactly as on the youtube video of "Making HTML 5 games with WADE - part 2 provided by Chiliworks"
Ty!