Skip to content

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

Closed
@rexrainbow

Description

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions