mirror of
https://github.com/bevyengine/bevy
synced 2024-12-03 09:59:15 +00:00
8570b651f9
# 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) |
||
---|---|---|
.. | ||
alien_cake_addict.rs | ||
breakout.rs | ||
game_menu.rs |