-
-
Notifications
You must be signed in to change notification settings - Fork 932
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
Why my sequenced animation works incorrectly? #17
Comments
Another question:
Thanks! |
Hi, @spkingr ! Maybe it's not so clear in the docs, but Regarding the box2d related questions, maybe @feroult can help you out better than me :) |
@spkingr Inside a World world;
List<BodyComponent> components = []; I think the problem is that the It is probably a better design to have an API to make the process of creating and destroying bodies atomically change this two variables. |
Just created an API: 443f304
|
@luanpotter Thanks very much! I have tried and it works fine now. Is there any API like |
@feroult
to
It works for me now in collision detection. I try to change the code in
But the problem 1 and 2 still there, help, thanks! |
I made this change to the API so the Box2D Component would only accept You can still mix then in the higher-level Game I think this way we have a better design, what do you think? |
That's okay, separate the physic components with regular ones will be much more efficiency. And I think sometimes the simple game won't need physic at all, supply some util methods for math is enough. |
@spkingr, AFAIK it's not possible to use libgdx with flutter; libgdx is a different framework that works with Java and also provide the ability to make multi-platform games, but their are not compatible. In flame we use Flutter low levels API to render, witch are similar to OpenGL bindings, but not exactly the same. |
@luanpotter I got it. I have cloned |
I'd suggest reading the
You can also open issues with questions, help with PRs and please send us your work to eventually be showcased here (we are planning on something along those lines). Thanks for your interest! |
@spkingr I will close this issue for now, if you have more questions or would like to submit issues, prs, et cetera, please feel free to open new issues! |
I use
AnimationComponent.sequenced
to make the animation sprite in my code, but it renders the whole images again and again(just flash in my screen), that is not what I wanted, the animation should be played with one frame and then another, here is the code:The image is 2000 pixels width and 250 height, with 8 swan-sprite made. How to use the animation components? Help and thanks very much!
The text was updated successfully, but these errors were encountered: