Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't start the same timer when time-out #5887

Closed
rexrainbow opened this issue Oct 26, 2021 · 1 comment
Closed

Can't start the same timer when time-out #5887

rexrainbow opened this issue Oct 26, 2021 · 1 comment

Comments

@rexrainbow
Copy link
Contributor

Version

  • Phaser Version: 3.60.0
  • Operating system: win11
  • Browser: Chrome, firefox

Description

Example Test Code

See this test

  1. Start a timer first time
  2. Start the same timer under time-out callback (Case A)

This timer can't start at the same tick with time-out. In this case, timer is added to
_pendingRemoval and _pendingInsertion both
, and been destroyed, clear callback. Therefore no callback available in next time-out.

A workaround is start this timer at next tick (Case B), new callback is set after destroyed

@photonstorm
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants