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

Don't set _secondsSinceStart in set_startDelay. #2262

Merged
merged 1 commit into from
Jul 20, 2020

Conversation

Sheepolution
Copy link
Contributor

This fixes the issue where setting the startDelay after creation of the tween doesn't work.

When you set a delay of 3 for the first time before the tween started, _secondsSinceStart becomes 0 * 0 + 3.
So the tween now acts as if 3 seconds have passed since the start. Meaning that it skips the delay of 3 seconds. Furthermore I don't see a good reason as to why you would want to increase the delay after the tween has already started (Started as in had its first update. Essentially every tween has already started, since .start() gets called on creation). And if there was a good reason to do so, I don't see why changing the delay from 3 to 5 seconds should have the _secondsSinceStart be increased by 2 seconds. This might make sense for the loopDelay, but not for the startDelay.

When you set a delay of 3 for the first time before the tween started, _secondsSinceStart becomes 0 * 0 + 3.
So the tween now acts as if 3 seconds have passed since the start. Meaning that it skips the delay of 3 seconds. Furthermore I don't see a good reason as to why you would want to increase the delay after the tween has already started (Started as in had its first update. Essentially every tween has already started, since .start() gets called on creation). And if there was a good reason to do so, I don't see why changing the delay from 3 to 5 seconds should have the _secondsSinceStart be increased by 2 seconds. This might make sense for the loopDelay, but not for the startDelay.
@Gama11 Gama11 merged commit bc11b6f into HaxeFlixel:dev Jul 20, 2020
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

Successfully merging this pull request may close these issues.

2 participants