update path
This commit is contained in:
parent
5c923dcf9a
commit
1a65fad218
1 changed files with 3 additions and 3 deletions
|
|
@ -133,11 +133,11 @@ fn pan(
|
||||||
camera.target += (vx + vy) * pan_speed;
|
camera.target += (vx + vy) * pan_speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
const INPUT_MAP_PATH: &'static str = "assets/settings/camera.ron";
|
const SETTINGS_PATH: &'static str = "assets/settings/camera.ron";
|
||||||
|
|
||||||
fn save(settings: Res<CameraSettings>) {
|
fn save(settings: Res<CameraSettings>) {
|
||||||
if settings.is_changed() {
|
if settings.is_changed() {
|
||||||
if let Err(e) = settings.save_to_file(INPUT_MAP_PATH) {
|
if let Err(e) = settings.save_to_file(SETTINGS_PATH) {
|
||||||
error!("Failed to save camera settings: {}", e);
|
error!("Failed to save camera settings: {}", e);
|
||||||
} else {
|
} else {
|
||||||
info!("Camera settings saved successfully");
|
info!("Camera settings saved successfully");
|
||||||
|
|
@ -146,7 +146,7 @@ fn save(settings: Res<CameraSettings>) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn setup(mut commands: Commands) {
|
fn setup(mut commands: Commands) {
|
||||||
let settings = match CameraSettings::load_from_file(INPUT_MAP_PATH) {
|
let settings = match CameraSettings::load_from_file(SETTINGS_PATH) {
|
||||||
Ok(settings) => {
|
Ok(settings) => {
|
||||||
info!("Loaded camera settings");
|
info!("Loaded camera settings");
|
||||||
settings
|
settings
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue