~starkingdoms/starkingdoms

ref: a19c22318b3ef4ee0a4c19fc22edb03bd1c0a037 starkingdoms/crates/unified/src/server/plugins.rs -rw-r--r-- 530 bytes
a19c2231 — core netcode: remove aeronet 7 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::time::Duration;
use bevy::app::{PluginGroup, PluginGroupBuilder, ScheduleRunnerPlugin};
use crate::shared::plugins::TICK_RATE;

pub struct ServerPluginGroup;

impl PluginGroup for ServerPluginGroup {
    fn build(self) -> PluginGroupBuilder {
        PluginGroupBuilder::start::<Self>()
            .add(ScheduleRunnerPlugin::run_loop(Duration::from_secs_f64(1.0 / TICK_RATE)))
            .add(bevy_replicon::server::ServerPlugin::default())
            .add(bevy_replicon::server::message::ServerMessagePlugin)
    }
}