diff --git a/Cargo.toml b/Cargo.toml index cea5ed4..3abf606 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" build = "build.rs" [dependencies] -bevy_fmod = { version = "0.4", features = ["live-update"] } +bevy_fmod = { version = "0.4" } bevy = { version = "0.13", features = ["jpeg", "hdr", "serialize"] } serde = "1" toml = { version = "0.8", features = ["parse"] } @@ -17,7 +17,7 @@ gltf = "*" [features] trace = ["bevy/trace_tracy", "bevy/trace_tracy_memory"] -debug = ["bevy/dynamic_linking", "bevy/file_watcher"] +debug = ["bevy/dynamic_linking", "bevy/file_watcher", "bevy_fmod/live-update"] [profile.dev] debug = 1 diff --git a/assets/martian.tweak.toml b/assets/martian.tweak.toml index 0b62b2e..f549330 100644 --- a/assets/martian.tweak.toml +++ b/assets/martian.tweak.toml @@ -236,17 +236,13 @@ intro_a = "GameCamIntro1" # The intro we use intro_b = "GameCamIntro2" # Blue -> Red -turn_b = "GameCamSide2.1>1" +turn_b = "GameCamSide2.1>1.1" # Red -> Blue -turn_a = "GameCamSide1.1>2" +turn_a = "GameCamSide1.1>2.1" # Red -> Better view turn_up_b = "GameCamSide1>1.1" # Blue -> Better view turn_up_a = "GameCamSide2>2.1" -# Red -> Base view -turn_down_b = "GameCamSide1.1>1" -# Blue -> Base view -turn_down_a = "GameCamSide2.1>2" [display3d.models.animations.pick_up] PawnBlue = "PawnBluePiecePickup" diff --git a/assets/models/Martian Chess.glb b/assets/models/Martian Chess.glb index 774178e..ad94759 100644 --- a/assets/models/Martian Chess.glb +++ b/assets/models/Martian Chess.glb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:65eeba43cefd86e6f2c30c7b1947a6eb5567667e2a945007dd47bb3d83e14e1b -size 8853068 +oid sha256:2a548cb973bb6ef7f2c7d829381ba8bf6e76adaddbb354d0a2b5c94d7279b45b +size 8847992 diff --git a/src/audio.rs b/src/audio.rs index e5771ee..31af116 100644 --- a/src/audio.rs +++ b/src/audio.rs @@ -128,7 +128,7 @@ fn audio_trigger( } // we are playing a sound _ => { - info!("Playing audio {}", event_str); + debug!("Playing audio {}", event_str); let audio_source = AudioSource::new(event_description); audio_source.set_volume(vol.0); // TODO: Can we batch spawn all sounds at startup? Then Start/Stop/Reset at runtime? diff --git a/src/display3d.rs b/src/display3d.rs index ef798e4..3ddc7c2 100644 --- a/src/display3d.rs +++ b/src/display3d.rs @@ -90,17 +90,10 @@ impl Plugin for Display3dPlugin { .run_if(any_component_added::() .or_else(any_component_removed::()) ), - // vantage point camera when playing against AI + // Camera moving up when first piece is selected in the game vantage_point .run_if(in_state(GameState::Play)) - .run_if(in_state(PlayState::AiBogo).and_then(in_state(TurnState(Side::B)))) - .run_if(any_component_added::().or_else(state_changed::)), - // vantage point camera when playing against human - vantage_point - .run_if(in_state(GameState::Play)) - .run_if(in_state(PlayState::Human)) - .run_if(not(state_changed::)) - .run_if(any_component_added::().or_else(any_component_removed::())), + .run_if(any_component_added::()), update_pieces .run_if(resource_exists::) .run_if(in_state(GameState::Play)) @@ -1034,9 +1027,7 @@ fn switch_sides( } fn vantage_point( - selected: Query>, mut players: Query<&mut AnimationPlayer, (With, With)>, - events: EventReader>, gltfs: Res>, state: Res>, tweaks: Res>, @@ -1054,14 +1045,7 @@ fn vantage_point( info!("Getting a better view"); // play down events on state transitions - let animation_key = if events.len() > 0 && *up { - *up = false; - match state.get() { - game::TurnState(game::Side::A) => "display3d_models_animations_turn_down_a", - game::TurnState(game::Side::B) => "display3d_models_animations_turn_down_b", - } - // Play up events when selected > 0 - } else if selected.iter().count() == 1 && !*up { + let animation_key = if !*up { *up = true; match state.get() { game::TurnState(game::Side::A) => "display3d_models_animations_turn_up_a", diff --git a/src/game.rs b/src/game.rs index f80358f..d3016be 100644 --- a/src/game.rs +++ b/src/game.rs @@ -612,7 +612,7 @@ impl Board { Some(MoveType::Capture) } None => { - info!("Last move: {:?}", self.moves.last()); + debug!("Last move: {:?}", self.moves.last()); // move is valid if it does not un-do the previous move for this piece match self.moves.last() { Some(previous) => { diff --git a/src/main.rs b/src/main.rs index 5d20c78..cf74049 100644 --- a/src/main.rs +++ b/src/main.rs @@ -116,7 +116,7 @@ where ), >, curr_state: Res>| { - info!("Activating state {:?}", *curr_state); + debug!("Activating state {:?}", *curr_state); entities.iter_mut().for_each(|(mark, mut visibility)| { *visibility = if mark == curr_state.get() { Visibility::Inherited diff --git a/src/menu.rs b/src/menu.rs index 5a740a7..4cb0b1c 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -381,7 +381,7 @@ fn handle_button_press( (*interaction == Interaction::Pressed).then_some(button_action) }) .for_each(|ButtonAction(ba)| { - info!("Button press: {:?} => {:?}", next_state, ba); + debug!("Button press: {:?} => {:?}", next_state, ba); next_state.set(ba.clone()) }); }