Newer
Older
mod window;
mod _plugin {
use bevy::app::App;
use bevy::prelude::{IntoSystemConfig, Plugin};
use bevy::time::common_conditions::on_fixed_timer;
use std::time::Duration;
pub struct SystemPlugin;
impl Plugin for SystemPlugin {
fn build(&self, app: &mut App) {
.add_startup_system(super::parallax::spawn_backgrounds)
.add_system(
super::parallax::cycle_background_positions
.run_if(on_fixed_timer(Duration::from_millis(100))),
);
}
}
}
pub use camera::default_projection;
pub use parallax::{Background, BACKGROUND_HEIGHT, BACKGROUND_WIDTH};
pub use window::{window_bounds, VIEWPORT_HEIGHT, VIEWPORT_WIDTH};
pub use _plugin::SystemPlugin;