mirror of
https://github.com/kristoferssolo/maze-ascension.git
synced 2025-10-21 19:20:34 +00:00
fix: lint warnings
This commit is contained in:
parent
4145abda19
commit
e15c055f06
@ -1,18 +0,0 @@
|
||||
use bevy::prelude::*;
|
||||
|
||||
use crate::theme::{palette::rose_pine::RosePineDawn, prelude::ColorScheme};
|
||||
|
||||
pub fn setup_camera_fog(mut commands: Commands) {
|
||||
commands.spawn((
|
||||
Name::new("Fog"),
|
||||
DistanceFog {
|
||||
color: RosePineDawn::Overlay.to_color(),
|
||||
directional_light_color: RosePineDawn::Overlay.to_color(),
|
||||
falloff: FogFalloff::Linear {
|
||||
start: 1.,
|
||||
end: 20.,
|
||||
},
|
||||
..default()
|
||||
},
|
||||
));
|
||||
}
|
||||
@ -1,17 +1,14 @@
|
||||
mod despawn;
|
||||
mod fog;
|
||||
mod movement;
|
||||
mod spawn;
|
||||
|
||||
use crate::maze::MazePluginLoaded;
|
||||
use bevy::prelude::*;
|
||||
use despawn::despawn_floor;
|
||||
use fog::setup_camera_fog;
|
||||
use movement::{handle_floor_transition_events, move_floors};
|
||||
use spawn::spawn_floor;
|
||||
|
||||
pub(super) fn plugin(app: &mut App) {
|
||||
app.add_systems(Startup, setup_camera_fog);
|
||||
app.add_systems(
|
||||
Update,
|
||||
(
|
||||
|
||||
@ -44,8 +44,6 @@ pub(super) fn spawn_maze(
|
||||
_ => FLOOR_Y_OFFSET,
|
||||
} as f32;
|
||||
|
||||
// (floor - 1) * FLOOR_Y_OFFSET
|
||||
|
||||
let entity = commands
|
||||
.spawn((
|
||||
Name::new(format!("Floor {}", floor)),
|
||||
|
||||
@ -106,7 +106,7 @@ macro_rules! create_color_scheme {
|
||||
|
||||
impl $name {
|
||||
fn hex_to_rgb(hex: &str) -> (u8, u8, u8) {
|
||||
let hex = if hex.starts_with('#') { &hex[1..] } else { hex };
|
||||
let hex = hex.strip_prefix('#').unwrap_or(hex);
|
||||
let r = u8::from_str_radix(&hex[0..2], 16).unwrap_or(0);
|
||||
let g = u8::from_str_radix(&hex[2..4], 16).unwrap_or(0);
|
||||
let b = u8::from_str_radix(&hex[4..6], 16).unwrap_or(0);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user