comment unused constant
This commit is contained in:
parent
2b8e04e4d6
commit
91d24e3bf4
2 changed files with 5 additions and 2 deletions
|
@ -270,7 +270,7 @@ fn keyboard_input_system(
|
|||
fn character_particle_effect_system(
|
||||
mut characters: Query<(&CharacterId, &Transform, &CharacterColor)>,
|
||||
mut particle_effect: ResMut<crate::particle_effect::ParticleEffectResource>,
|
||||
mut level_query: Query<(&SelectedCharacterId)>,
|
||||
mut level_query: Query<&SelectedCharacterId>,
|
||||
) {
|
||||
if let Ok(selected_character_id) = level_query.get_single_mut() {
|
||||
if let Some(selected_character_id) = &selected_character_id.0 {
|
||||
|
@ -308,6 +308,7 @@ fn move_camera(
|
|||
mut camera_query: Query<(&Camera, &mut Transform, &GlobalTransform)>,
|
||||
characters: Query<(&CharacterId, &Transform), Without<Camera>>,
|
||||
level_query: Query<&SelectedCharacterId>,
|
||||
time: Res<Time>,
|
||||
) {
|
||||
const MARGIN: f32 = 128.0;
|
||||
|
||||
|
@ -324,6 +325,8 @@ fn move_camera(
|
|||
.world_to_viewport(camera_global_transform, transform.translation)
|
||||
.unwrap();
|
||||
let size = camera.logical_viewport_size().unwrap();
|
||||
|
||||
// force camera to be within margin
|
||||
if pos.x < MARGIN {
|
||||
camera_transform.translation.x += pos.x - MARGIN;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ pub const POOL_COUNT: usize = 100;
|
|||
|
||||
pub const MIN_VELOCITY: f32 = 10.0;
|
||||
pub const MAX_VELOCITY: f32 = 100.0;
|
||||
pub const VELOCITY_SCALE: f32 = 0.1;
|
||||
// pub const VELOCITY_SCALE: f32 = 0.1;
|
||||
pub const PARTICLE_EFFECT_RADIUS: f32 = 70.0;
|
||||
|
||||
pub struct ParticleEffectPlugin;
|
||||
|
|
Loading…
Reference in a new issue