Skip to content

Commit

Permalink
Added debug flag (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac8668 authored Jan 7, 2024
1 parent 954bf5a commit 17eeae8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 225 deletions.
206 changes: 0 additions & 206 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,3 @@ bevy_dylib = "0.12.1"
[profile.release]
codegen-units = 1
lto = true

[build-dependencies]
shadow-rs = "0.25.0"
31 changes: 15 additions & 16 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,8 @@ mod player;
mod prelude {
pub use crate::atom::State;
pub use crate::{
actors::*,
animation::*,
atom::*,
chunk::*,
chunk_group::*,
chunk_manager::*,
consts::*,
geom_tools::*,
manager_api::*,
particles::*,
player::*, //debug::*,
actors::*, animation::*, atom::*, chunk::*, chunk_group::*, chunk_manager::*, consts::*,
debug::*, geom_tools::*, manager_api::*, particles::*, player::*,
};
pub use bevy::input::mouse::MouseScrollUnit;
pub use bevy::input::mouse::MouseWheel;
Expand All @@ -38,6 +29,7 @@ mod prelude {
pub use serde_big_array::BigArray;

pub use std::collections::{HashMap, HashSet};
pub use std::env;
pub use std::fs;
pub use std::fs::File;
pub use std::io::Write;
Expand All @@ -46,19 +38,26 @@ mod prelude {
use prelude::*;

fn main() {
App::new()
.add_plugins(DefaultPlugins.set(ImagePlugin::default_nearest()))
let args: Vec<_> = env::args().collect();

let mut app = App::new();

app.add_plugins(DefaultPlugins.set(ImagePlugin::default_nearest()))
//local plugins
.add_plugins((
ChunkManagerPlugin,
//DebugPlugin,
ActorsPlugin,
PlayerPlugin,
animation::AnimationPlugin,
ParticlesPlugin,
))
.add_systems(Startup, setup_camera)
.run();
.add_systems(Startup, setup_camera);

if args.contains(&"-d".to_string()) || args.contains(&"--debug".to_string()) {
app.add_plugins(DebugPlugin);
}

app.run();
}

fn setup_camera(mut commands: Commands) {
Expand Down

0 comments on commit 17eeae8

Please sign in to comment.