Skip to content

Instantly share code, notes, and snippets.

#[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 {
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
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| {