I have the main loop of the program looped using requestAnimationFrame As for example after the character crashed, disable the collision for him for 3 seconds and blink at the same speed? At the same time, the entire gameplay will continue to animate at a different speed
How can I run another animation at a different speed and for a time during one animation?
The code I think is not required here, a standard animation loop using requestAnimationFrame:
function loop() {
requestAnimationFrame(loop)
let now = new Date().getTime(),
dt = now - (time || now)
time = now
game.step(dt)
game.render()
}
thanks