How do I run a function after a certain amount of time has passed?
please don’t send an example please provide code
thanks,
var timedEvent = this.time.addEvent({
delay: gameOptions.changeTime,
callback: this.changeSpeed,
callbackScope: this,
loop: true,
});
How will this fire a function? also where would I put this bit of code create()
or update()
var timedEvent = this.time.addEvent({
delay: “you time”,
callback: "your function”,
callbackScope: this,
loop: true,
});
put it to create()