mirror of
https://github.com/kristoferssolo/maze-ascension.git
synced 2025-12-31 13:42:36 +00:00
30 lines
556 B
Rust
30 lines
556 B
Rust
use bevy::prelude::*;
|
|
|
|
#[derive(Debug, Reflect, Resource, Clone)]
|
|
#[reflect(Resource)]
|
|
pub struct GlobalMazeConfig {
|
|
pub hex_size: f32,
|
|
pub wall_thickness: f32,
|
|
pub height: f32,
|
|
}
|
|
|
|
impl GlobalMazeConfig {
|
|
pub fn wall_size(&self) -> f32 {
|
|
self.hex_size / 6.
|
|
}
|
|
|
|
pub fn wall_offset(&self) -> f32 {
|
|
self.hex_size - self.wall_size()
|
|
}
|
|
}
|
|
|
|
impl Default for GlobalMazeConfig {
|
|
fn default() -> Self {
|
|
Self {
|
|
hex_size: 6.,
|
|
wall_thickness: 1.,
|
|
height: 20.,
|
|
}
|
|
}
|
|
}
|