FIO72ZSANLC3OS5IKSZ4PUAIBFAAHZA6EFGHMHP6YVFGTOJ7PPKQC
X6Q2DCTTZVQ2HCA4BFLKONTXJ2AYHTBBZCARASBEKEDCDZ2YSPUQC
JV22QZEHUOIQD6B3P5F3CT5H3FFR4VH5Q64XG2TQKSTSXEVBH6MAC
VICUJP7SGKKCO2ZWO5ACSO3OS4HV4JTXTHQHYSFOADANGUJ5ZDDAC
KZU3YXA22IYIPZICQTMZ4XILKCWOI5O6W4H72PDXDUTZDFVMVGVQC
7FTW5AQKOO4W5AIHYZSAKLQR6LGVTXH7SKMSTA4ER4C4HP54VE4QC
EV477LPQ57FEHMFO6E3LL5MFWZC6NTGER42SKP5CJN73SWXGB5AQC
MKB2A5XCWBZO2E6QFE6PD36LF3IGMJCGJB5TGMRAPSKCKHS75ISAC
ZJ2DSL63RVPSNXIGTAZNPV6HLHOKLWC5RSK5EAAM3HIYUJ5Y3ISQC
ASIORORAPGGVNLR42J6PZRTG7JKK34GYXBYSKSTJFXSFW6YXBJJQC
ZW67OU7OPHAITCJS3GHQYFBRY5YGOIGRD7B4CKULAXAEXHM42KYQC
7UOD3DXGSU55P6N63FZC7556JSBKOUS6JQ2W6NAXRMV66DBSQIYAC
5VMLVYL7NPW4FW3NP45VJZCQIO4UAFOKVLAGNW42HG6OJEBMFFQQC
WQS2WD437EWG2CKPOY5TDWPEBE3US7LGHVAH2HVYQ7RW2L6FHJ5AC
pub struct DebugPlugin;
impl Plugin for DebugPlugin {
fn build(&self, app: &mut App) {
app.add_systems(Update, debug_view_window.run_if(in_state(GameState::InRun)))
.add_systems(Startup, setup_debug_collection);
}
}
#[derive(Resource)]
struct DebugAssets {
noisy_handle: Handle<fundsp_kira::Machine>,
}
fn setup_debug_collection(
mut machines: ResMut<Assets<fundsp_kira::Machine>>,
mut commands: Commands,
) {
use fundsp::hacker32::*;
let noisy_handle = machines.add(fundsp_kira::Machine::new(
pink() * envelope(|t| exp(-5.0 * t)),
// pink() * 0.2,
));
commands.insert_resource(DebugAssets { noisy_handle })
}
use fundsp::hacker32::*;
track.play(&fundsp_kira::Machine::new(
pink() * envelope(|t| exp(-5.0 * t)),
// pink() * 0.2,
));
if let Some(assets) = assets {
track.play(assets.noisy_handle.clone());
} else {
warn!("Debug asset noisy_handle not loaded...");
}