bevy/examples/game
Alice Cecile 8570b651f9 Clean up Breakout logic (#4311)
# Objective

1. Spawning walls in the Breakout example was hard to follow and error-prone.
2. The strategy used in `paddle_movement_system` was somewhat convoluted.
3. Correctly modifying the size of the arena was hard, due to implicit coupling between the bounds and the bounds that the paddle can move in.

## Solution

1. Refactor this to use a WallBundle struct with a builder; neatly demonstrating some essential patterns along the way.
2. Use clamp and avoid using weird &mut strategies.
3. Refactor logic to allow users to tweak the brick size, and automatically adjust the number of rows and columns to match.
4. Make the brick layout more like classic breakout!

![image](https://user-images.githubusercontent.com/3579909/160019864-06747361-3b5b-4944-b3fd-4978604e2ef5.png)
2022-03-24 23:57:36 +00:00
..
alien_cake_addict.rs use marker components for cameras instead of name strings (#3635) 2022-03-12 00:41:06 +00:00
breakout.rs Clean up Breakout logic (#4311) 2022-03-24 23:57:36 +00:00
game_menu.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00