Closed samreid closed 7 years ago
I went ahead and moved the advancement of the timer into the step function. I've tested it out, and it appears to work well and is consistent with the operation of the currently published version.
I also tested it in the "instance proxies" wrapper to verify that that game clock now stops when buildAnAtom.sim.activeProperty
is set to false, and it does.
@samreid - please review and close if it looks like this should do the trick.
This is working great in the legends of learning test harness, and I also verified that the timer is working in the instance-proxies wrapper. Thanks @jbphet, closing.
While working on https://github.com/phetsims/joist/issues/423 I found that pausing the sim using Sim.activeProperty does not pause the game timer. This is because the game timer is implemented like so:
This will have problems for PhET-iO and Legends of Learning (non-PhET-iO). One solution may be to switch to phet-core Timer, but perhaps the best solution would be to pass through dt values through step().
@jbphet can you please look into this?