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
+
operator to create sequence of actions
#172
Comments
It could be similar to |
Ooops, indeed I forgot about However I personally think that Using But a val sequence1 = moveTo(200f, 200f, 0.5f) + rotateTo(90f, 0.5f) + fadeOut(0.5f)
val sequence2 = moveTo(200f, 200f, 0.5f) then rotateTo(90f, 0.5f) then fadeOut(0.5f) // should produce the same result as above
sequence2 += remove() // One could still mutate a sequence like this EDIT: Let me also argue that the
|
These are valid points. I believe when I was implementing this, I was in the LibGDX mindset of trying to go easy on the garbage collector, but I agree that idiomatic Kotlin approach is better in this case. |
Thanks for your contribution @jcornaz. I just realized |
No. I don't see the point of a non-obvious operator for parallel actions. In this case |
|
I think a
+
operator to easily create a sequence of actions would be niceExample:
The text was updated successfully, but these errors were encountered: