diff options
author | Henauxg <19689618+Henauxg@users.noreply.github.com> | 2022-11-03 17:48:19 +0100 |
---|---|---|
committer | Henauxg <19689618+Henauxg@users.noreply.github.com> | 2022-11-03 17:48:19 +0100 |
commit | e104ce1299a64fb2b575a2193ec2151b48667165 (patch) | |
tree | 274e3ad13d9a66e1b30f15bb8c61d6f377e79328 /examples/breakout/protocol.rs | |
parent | a6f63d755caf51cd9866ba5aaf0c9fd3c0d56bde (diff) |
[example:breakout] Networked bricks destruction
Diffstat (limited to 'examples/breakout/protocol.rs')
-rw-r--r-- | examples/breakout/protocol.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/breakout/protocol.rs b/examples/breakout/protocol.rs index 4e2b309..92a0cfb 100644 --- a/examples/breakout/protocol.rs +++ b/examples/breakout/protocol.rs @@ -2,6 +2,8 @@ use bevy::prelude::{Entity, Vec2, Vec3}; use bevy_quinnet::ClientId; use serde::{Deserialize, Serialize}; +use crate::BrickId; + #[derive(Debug, Default, Clone, Serialize, Deserialize, PartialEq, Eq)] pub(crate) enum PaddleInput { #[default] @@ -23,7 +25,7 @@ pub(crate) enum ServerMessage { client_id: ClientId, }, SpawnPaddle { - client_id: ClientId, + owner_client_id: ClientId, entity: Entity, position: Vec3, }, @@ -39,7 +41,8 @@ pub(crate) enum ServerMessage { }, StartGame, BrickDestroyed { - client_id: ClientId, + by_client_id: ClientId, + brick_id: BrickId, }, BallCollided { entity: Entity, |