-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - Improve many sprites example #2785
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alice-i-cecile
added
C-Bug
An unexpected or incorrect behavior
C-Code-Quality
A section of code that is hard to understand or change
C-Examples
An addition or correction to our examples
and removed
S-Needs-Triage
This issue needs to be labelled
labels
Sep 8, 2021
alice-i-cecile
approved these changes
Sep 8, 2021
This was referenced Sep 8, 2021
alice-i-cecile
added
the
S-Ready-For-Final-Review
This PR has been approved by the community. It's ready for a maintainer to consider merging it
label
Sep 8, 2021
I disagree with the addition of the _system postfix, but other than that it looks good |
Sheepyhead
approved these changes
Sep 8, 2021
IceSentry
approved these changes
Sep 8, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I'm not opposed to anything here, I would prefer not using unwrap() in example code, but it's still good without.
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Sep 10, 2021
# Objective My attempt at fixing #2075 . This is my very first contribution to this repo. Also, I'm very new to both Rust and bevy, so any feedback is *deeply* appreciated. ## Solution - Changed `move_camera_system` so it only targets the camera entity. My approach here differs from the one used in the [cheatbook](https://bevy-cheatbook.github.io/cookbook/cursor2world.html?highlight=maincamera#2d-games) (in which a marker component is used to track the camera), so please, let me know which of them is more idiomatic. - `move_camera_system` does not require both `Position` and `Transform` anymore (I used `rotate` for rotating the `Transform` in place, but couldn't find an equivalent `translate` method). - Changed `tick_system` so it only targets the timer entity. - Sprites are now spawned via a single `spawn_batch` instead of multiple `spawn`s.
Build failed: |
bors retry |
bors bot
pushed a commit
that referenced
this pull request
Sep 10, 2021
# Objective My attempt at fixing #2075 . This is my very first contribution to this repo. Also, I'm very new to both Rust and bevy, so any feedback is *deeply* appreciated. ## Solution - Changed `move_camera_system` so it only targets the camera entity. My approach here differs from the one used in the [cheatbook](https://bevy-cheatbook.github.io/cookbook/cursor2world.html?highlight=maincamera#2d-games) (in which a marker component is used to track the camera), so please, let me know which of them is more idiomatic. - `move_camera_system` does not require both `Position` and `Transform` anymore (I used `rotate` for rotating the `Transform` in place, but couldn't find an equivalent `translate` method). - Changed `tick_system` so it only targets the timer entity. - Sprites are now spawned via a single `spawn_batch` instead of multiple `spawn`s.
bors
bot
changed the title
Improve many sprites example
[Merged by Bors] - Improve many sprites example
Sep 10, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-Bug
An unexpected or incorrect behavior
C-Code-Quality
A section of code that is hard to understand or change
C-Examples
An addition or correction to our examples
S-Ready-For-Final-Review
This PR has been approved by the community. It's ready for a maintainer to consider merging it
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
My attempt at fixing #2075 .
This is my very first contribution to this repo. Also, I'm very new to both Rust and bevy, so any feedback is deeply appreciated.
Solution
move_camera_system
so it only targets the camera entity. My approach here differs from the one used in the cheatbook (in which a marker component is used to track the camera), so please, let me know which of them is more idiomatic.move_camera_system
does not require bothPosition
andTransform
anymore (I usedrotate
for rotating theTransform
in place, but couldn't find an equivalenttranslate
method).tick_system
so it only targets the timer entity.spawn_batch
instead of multiplespawn
s.