Switch to replicon (#80)

This commit is contained in:
PROMETHIA-27
2025-12-08 19:22:17 -05:00
committed by GitHub
parent 7a5d2e6914
commit ff52258ad2
55 changed files with 1212 additions and 2951 deletions

17
crates/shared/src/tick.rs Normal file
View File

@@ -0,0 +1,17 @@
use crate::GameState;
use bevy::prelude::*;
pub fn plugin(app: &mut App) {
app.init_resource::<GameTick>();
app.add_systems(
FixedLast,
(|mut tick: ResMut<GameTick>| {
tick.0 += 1;
})
.run_if(in_state(GameState::Playing)),
);
}
#[derive(Default, Resource)]
pub struct GameTick(pub u64);