-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Objective - Improve the code quality of the breakout example - As a newcomer to `bevy` I was pointed to the breakout example after the "Getting Started" tutorial - I'm making this PR because it had a few wrong comments + some inconsistency in used patterns ## Solution - Remove references to `wall` in all the collision code as it also handles bricks and the paddle - Use the newtype pattern with `bevy::prelude::Deref` for resources - It was already used for `Velocity` before this PR - `Scoreboard` is a resource only containing `score`, so it's simpler as a newtype `Score` resource - `CollisionSound` is already a newtype, so might as well unify the access pattern for it - Added docstrings for `WallLocation::position` and `WallLocation::size` to explain what they represent
- Loading branch information
Showing
1 changed file
with
25 additions
and
26 deletions.
There are no files selected for viewing
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