diff --git a/src/filters.rs b/src/filters.rs index 7596677..9a18af2 100644 --- a/src/filters.rs +++ b/src/filters.rs @@ -23,10 +23,6 @@ impl PassThroughFilter { PassThroughFilter::Rotating(filter_angle) => { let mut hsla = color.as_hsla_f32(); hsla[0] = (hsla[0] + filter_angle) % 360.; - // floating rem is not modulo! - if hsla[0] < 0. { - hsla[0] += 360.; - } Color::hsla(hsla[0], hsla[1], hsla[2], hsla[3]) } } diff --git a/src/game.rs b/src/game.rs index 204858f..015a268 100644 --- a/src/game.rs +++ b/src/game.rs @@ -25,7 +25,6 @@ pub struct GamePlugin; impl Plugin for GamePlugin { fn build(&self, app: &mut App) { app.add_event::() - .add_event::() .init_resource::() .insert_resource(CurrentLevel(None)) .init_resource::() @@ -42,8 +41,7 @@ impl Plugin for GamePlugin { .with_system(player_movement_system) .with_system(level_keyboard_system) .with_system(camera_system) - .with_system(character_particle_effect_system) - .with_system(kill_character_system), + .with_system(character_particle_effect_system), ) .add_system_set( SystemSet::on_update(AppState::Win) @@ -67,8 +65,6 @@ impl Plugin for GamePlugin { pub struct LevelStartupEvent; -pub struct ChangeCharacterEvent; - // Resources pub struct CurrentLevel(pub Option); @@ -439,14 +435,14 @@ fn collision_event_system( fn change_character_system( mut commands: Commands, + keyboard_input: Res>, characters: Query<(Entity, &CharacterColor, Option<&Player>)>, character_list: Res, audio_assets: Res, audio: Res