You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A tween will not reliably restart using the restart() function. This appears to happen when the tween state is PENDING_REMOVE at the time the restart() is called. The PENDING_REMOVE state appears to be a transitional state, on the way to REMOVED, begun when the tween completes.
Expected behaviour would be for the restart() call to work everytime.
Example Test Code
The test case is based on the restart example using v3.19.0. The bright arrow will tween towards the dim arrow, when it gets there it should restart the animation and loop that sequence. You will see that sometimes it hangs at the beginning.
The test case was designed to trigger a tween restart() after the same period of time taken for the tween to naturally complete, sometimes it will catch the tween in the PENDING_REMOVE state and it will not retrigger.
To run the test case, launch the example, in the editor, running phaser v3.19.0, using this link:
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.
Version
Description
A tween will not reliably restart using the restart() function. This appears to happen when the tween state is PENDING_REMOVE at the time the restart() is called. The PENDING_REMOVE state appears to be a transitional state, on the way to REMOVED, begun when the tween completes.
Expected behaviour would be for the restart() call to work everytime.
Example Test Code
The test case is based on the restart example using v3.19.0. The bright arrow will tween towards the dim arrow, when it gets there it should restart the animation and loop that sequence. You will see that sometimes it hangs at the beginning.
The test case was designed to trigger a tween restart() after the same period of time taken for the tween to naturally complete, sometimes it will catch the tween in the PENDING_REMOVE state and it will not retrigger.
To run the test case, launch the example, in the editor, running phaser v3.19.0, using this link:
http://labs.phaser.io/edit.html?src=src\tweens\restart.js&v=3.19.0
then replace the code with this and click the 'Run Code' button:
The text was updated successfully, but these errors were encountered: