Skip to content

Commit

Permalink
Hide some debugs
Browse files Browse the repository at this point in the history
  • Loading branch information
deavid committed Mar 14, 2024
1 parent 408dc35 commit 897e3ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ghost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ fn ghost_enrage(
}
ghost.rage += angry * dt / 10.0;
avg_angry.push_len(angry, dt);
if timer.just_finished() {
if timer.just_finished() && DEBUG_HUNTS {
dbg!(&avg_angry.avg(), ghost.rage);
}
let rage_limit = if DEBUG_HUNTS { 40.0 } else { 120.0 };
Expand Down
4 changes: 3 additions & 1 deletion src/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ use bevy::ecs::system::SystemParam;
use bevy::prelude::*;
use std::time::Duration;

const DEBUG_PLAYER: bool = false;

#[derive(Component, Debug)]
pub struct PlayerSprite {
pub id: usize,
Expand Down Expand Up @@ -575,7 +577,7 @@ fn lose_sanity(
if ps.health > 100.0 {
ps.health = 100.0;
}
if timer.just_finished() {
if timer.just_finished() && DEBUG_PLAYER {
dbg!(ps.sanity(), mean_sound.0, ps.health);
}
}
Expand Down

0 comments on commit 897e3ac

Please sign in to comment.