bevy/examples/games
Tolki d3d9cab30c
Breakout refactor (#12477)
# 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
2024-03-14 17:32:05 +00:00
..
alien_cake_addict.rs Migrate from LegacyColor to bevy_color::Color (#12163) 2024-02-29 19:35:12 +00:00
breakout.rs Breakout refactor (#12477) 2024-03-14 17:32:05 +00:00
contributors.rs Disentangle bevy_utils/bevy_core's reexported dependencies (#12313) 2024-03-07 02:30:15 +00:00
desk_toy.rs We must have googly eyes (new Game example) (#12331) 2024-03-06 22:21:41 +00:00
game_menu.rs Fix green colors becoming darker in various examples (#12328) 2024-03-05 23:42:03 +00:00
stepping.rs Migrate from LegacyColor to bevy_color::Color (#12163) 2024-02-29 19:35:12 +00:00