This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[allow(unused_imports)] | |
use tracing::{info,warn,debug,error}; | |
use std::{io, fs}; | |
use std::path::Path; | |
use tracing_appender::non_blocking::WorkerGuard; | |
use tracing_subscriber::{fmt, layer::SubscriberExt, EnvFilter }; | |
/// Sets up logging to both stdout and files | |
pub fn setup<P: AsRef<Path> + Clone>(crate_name: &str, dir: P) -> WorkerGuard { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use bevy::prelude::*; | |
fn main() { | |
// create an alternative Update schedule with a new set of systems | |
// and store it in a resource to swap later | |
let mut update = Schedule::new(Update); | |
update.add_systems(bar); | |
let mut app = App::new(); | |
app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::time::Duration; | |
use bevy::color::palettes::css::RED; | |
use bevy::math::VectorSpace; | |
use bevy::prelude::*; | |
use bevy::time::common_conditions::once_after_delay; | |
fn main() { | |
App::new() | |
.add_plugins(DefaultPlugins) | |
.add_systems(Startup, |mut commands: Commands| { |
OlderNewer