pub trait NetworkPlayerControls<'a, Dense: DenseInput, Control>: PlayerControls<'a, Control> {
// Required methods
fn network_update(
&mut self,
player_idx: usize,
dense_input: &Dense,
status: NetworkInputStatus,
);
fn get_dense_control(&self, player_idx: usize) -> Dense;
}
Expand description
Required for use of PlayerControls
in networking.
Required Methods§
sourcefn network_update(
&mut self,
player_idx: usize,
dense_input: &Dense,
status: NetworkInputStatus,
)
fn network_update( &mut self, player_idx: usize, dense_input: &Dense, status: NetworkInputStatus, )
Update control of player from dense input.
NetworkInputStatus
communicates if input is confirmed, predicted, or from disconnected player.
sourcefn get_dense_control(&self, player_idx: usize) -> Dense
fn get_dense_control(&self, player_idx: usize) -> Dense
Get dense control for player.
Object Safety§
This trait is not object safe.