-
Is there a performance difference between // Query all Bullet entities
Bullet.Each(world, func(entry *donburi.Entry) {
bullet := Bullet.Get(entry)
// .. do stuff with the bullet entity
}) Or// Define a query by declaring what componet you want to find.
query := donburi.NewQuery(filter.Contains(Bullet))
// Iterate through the entities found in the world
query.Each(world, func(entry *donburi.Entry) {
// An entry is an accessor to entity and its components.
bullet := Bullet.Get(entry)
}) Also, Is it better to use |
Beta Was this translation helpful? Give feedback.
Answered by
yohamta
Apr 30, 2024
Replies: 1 comment
-
Hello, both of them are the same operation internally so there's no difference between them. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
setanarut
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, both of them are the same operation internally so there's no difference between them.