add debug log
This commit is contained in:
31
src/main.rs
31
src/main.rs
@@ -7,6 +7,7 @@ mod cash;
|
||||
mod cash_heal;
|
||||
mod control;
|
||||
mod cutscene;
|
||||
mod debug;
|
||||
mod gates;
|
||||
mod heads;
|
||||
mod hitpoints;
|
||||
@@ -32,6 +33,7 @@ use bevy_polyline::PolylinePlugin;
|
||||
use bevy_sprite3d::Sprite3dPlugin;
|
||||
use bevy_trenchbroom::prelude::*;
|
||||
use bevy_ui_gradients::UiGradientsPlugin;
|
||||
use camera::MainCamera;
|
||||
use control::controller::CharacterControllerPlugin;
|
||||
use loading_assets::AudioAssets;
|
||||
use utils::billboards;
|
||||
@@ -68,15 +70,25 @@ fn main() {
|
||||
cam_follow: true,
|
||||
});
|
||||
|
||||
app.add_plugins(DefaultPlugins.set(WindowPlugin {
|
||||
primary_window: Some(Window {
|
||||
title: "HEDZ Reloaded".into(),
|
||||
resolution: (1024., 768.).into(),
|
||||
..default()
|
||||
}),
|
||||
..default()
|
||||
}));
|
||||
app.add_plugins(
|
||||
DefaultPlugins
|
||||
.set(WindowPlugin {
|
||||
primary_window: Some(Window {
|
||||
title: "HEDZ Reloaded".into(),
|
||||
resolution: (1024., 768.).into(),
|
||||
..default()
|
||||
}),
|
||||
..default()
|
||||
})
|
||||
.set(bevy::log::LogPlugin {
|
||||
filter: "info".into(),
|
||||
level: bevy::log::Level::INFO,
|
||||
// provide custom log layer to receive logging events
|
||||
custom_layer: bevy_debug_log::log_capture_layer,
|
||||
}),
|
||||
);
|
||||
|
||||
app.add_plugins(bevy_debug_log::LogViewerPlugin::default());
|
||||
app.add_plugins(PhysicsPlugins::default());
|
||||
app.add_plugins(CharacterControllerPlugin);
|
||||
app.add_plugins(PolylinePlugin);
|
||||
@@ -120,6 +132,7 @@ fn main() {
|
||||
app.add_plugins(heads::plugin);
|
||||
app.add_plugins(hitpoints::plugin);
|
||||
app.add_plugins(cash_heal::plugin);
|
||||
app.add_plugins(debug::plugin);
|
||||
|
||||
app.init_state::<GameState>();
|
||||
|
||||
@@ -163,7 +176,7 @@ fn write_trenchbroom_config(server: Res<TrenchBroomServer>) {
|
||||
}
|
||||
|
||||
fn set_tonemapping(
|
||||
mut cams: Query<(&mut Tonemapping, &mut ColorGrading), With<Camera>>,
|
||||
mut cams: Query<(&mut Tonemapping, &mut ColorGrading), With<MainCamera>>,
|
||||
visuals: Res<DebugVisuals>,
|
||||
) {
|
||||
for (mut tm, mut color) in cams.iter_mut() {
|
||||
|
||||
Reference in New Issue
Block a user