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

'after' tween still happens if stopped. #12

Open
thegrb93 opened this issue Dec 8, 2020 · 4 comments · May be fixed by #13
Open

'after' tween still happens if stopped. #12

thegrb93 opened this issue Dec 8, 2020 · 4 comments · May be fixed by #13

Comments

@thegrb93
Copy link

thegrb93 commented Dec 8, 2020

local t = flux.to(...):after(...)

-- (after some time)

t:stop()

-- (The 'after' tween still plays if stopped before the start of the 'after' tween
@thegrb93
Copy link
Author

thegrb93 commented Dec 8, 2020

I had a solution come to mind, I might try and see if it fixes it.

local t = flux.to(...)
local t2 = t:after(...)

-- (after some time)

t:stop()
t2:stop()

Will see if this fixes my issue when I get a chance.

@thegrb93
Copy link
Author

thegrb93 commented Dec 8, 2020

worst case, I think I can do this.

local t = flux.to(...)
local t2 = flux.to(...):delay(...)

-- (after some time)

t:stop()
t2:stop()

@thegrb93
Copy link
Author

thegrb93 commented Dec 14, 2020

Both of my work-around solutions work.

@thegrb93
Copy link
Author

thegrb93 commented Dec 14, 2020

The problem is that 'after' returns a second tween separate from the first one. The readme could probably just be updated to warn about this.

thegrb93 added a commit to thegrb93/flux that referenced this issue Dec 16, 2020
@thegrb93 thegrb93 linked a pull request Dec 16, 2020 that will close this issue
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 a pull request may close this issue.

1 participant