aboutsummaryrefslogtreecommitdiff
path: root/examples/breakout/breakout.rs
diff options
context:
space:
mode:
authorHenauxg <19689618+Henauxg@users.noreply.github.com>2022-11-03 18:44:54 +0100
committerHenauxg <19689618+Henauxg@users.noreply.github.com>2022-11-03 18:44:54 +0100
commit6c087cdcf1b63d5d026e34b9765df96dff642685 (patch)
treeb0913e346b413860c1c5a63afe0a72f5c0bbf26b /examples/breakout/breakout.rs
parentcdd3ae90108f021fd42bcaf2d7a3d5c087a959e4 (diff)
[breakout:example] Handle score
Diffstat (limited to 'examples/breakout/breakout.rs')
-rw-r--r--examples/breakout/breakout.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/examples/breakout/breakout.rs b/examples/breakout/breakout.rs
index 761b636..123817c 100644
--- a/examples/breakout/breakout.rs
+++ b/examples/breakout/breakout.rs
@@ -101,11 +101,6 @@ impl WallLocation {
}
}
-// This resource tracks the game's score
-struct Scoreboard {
- score: usize,
-}
-
fn main() {
App::new()
.add_plugins(DefaultPlugins)
@@ -114,9 +109,9 @@ fn main() {
.add_event::<CollisionEvent>()
.add_state(GameState::MainMenu)
// Resources
- .insert_resource(Scoreboard { score: 0 })
.insert_resource(ClearColor(BACKGROUND_COLOR))
.insert_resource(server::Players::default())
+ .insert_resource(client::Scoreboard { score: 0 })
.insert_resource(client::ClientData::default())
.insert_resource(client::NetworkMapping::default())
.insert_resource(client::BricksMapping::default())
@@ -189,8 +184,6 @@ fn main() {
.with_system(server::update_paddles.before(server::check_for_collisions))
.with_system(server::apply_velocity.before(server::check_for_collisions))
.with_system(server::check_for_collisions),
- // .with_system(play_collision_sound.after(check_for_collisions))
- // .with_system(update_scoreboard)
)
.add_system(bevy::window::close_on_esc)
.run();