File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed
bevy_replicon_example_backend/examples Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 11//! A simple demo to showcase how player could send inputs to move a box and server replicates position back.
22//! Also demonstrates the single-player and how sever also could be a player.
33
4- use std:: {
5- hash:: { DefaultHasher , Hash , Hasher } ,
6- io,
7- } ;
4+ use std:: hash:: { DefaultHasher , Hash , Hasher } ;
85
96use bevy:: {
107 color:: palettes:: css:: GREEN ,
@@ -48,7 +45,7 @@ impl Plugin for SimpleBoxPlugin {
4845 }
4946}
5047
51- fn read_cli ( mut commands : Commands , cli : Res < Cli > ) -> io :: Result < ( ) > {
48+ fn read_cli ( mut commands : Commands , cli : Res < Cli > ) -> Result < ( ) > {
5249 match * cli {
5350 Cli :: SinglePlayer => {
5451 info ! ( "starting single-player game" ) ;
Original file line number Diff line number Diff line change 11//! A game to showcase single-player and multiplier game.
22//! Run it with `cargo run --example tic_tac_toe -- hotseat` to play locally or with `-- client` / `-- server`
33
4- use std:: {
5- fmt:: { self , Formatter } ,
6- io,
7- } ;
4+ use std:: fmt:: { self , Formatter } ;
85
96use bevy:: { platform:: collections:: HashMap , prelude:: * } ;
107use bevy_replicon:: prelude:: * ;
@@ -93,7 +90,7 @@ const LINE_THICKNESS: f32 = 10.0;
9390const BUTTON_SIZE : f32 = CELL_SIZE / 1.2 ;
9491const BUTTON_MARGIN : f32 = ( CELL_SIZE + LINE_THICKNESS - BUTTON_SIZE ) / 2.0 ;
9592
96- fn read_cli ( mut commands : Commands , cli : Res < Cli > ) -> io :: Result < ( ) > {
93+ fn read_cli ( mut commands : Commands , cli : Res < Cli > ) -> Result < ( ) > {
9794 match * cli {
9895 Cli :: Hotseat => {
9996 info ! ( "starting hotseat" ) ;
You can’t perform that action at this time.
0 commit comments