|
|
|
|
@ -519,11 +519,12 @@ struct TutorialStarted;
|
|
|
|
|
fn start_tutorial_on_play(
|
|
|
|
|
query: Query<Entity, (With<BoardComponent>, With<display3d::Dissolving>)>,
|
|
|
|
|
state: Res<State<TutorialState>>,
|
|
|
|
|
board: Res<game::Board>,
|
|
|
|
|
mut next_state: ResMut<NextState<TutorialState>>,
|
|
|
|
|
mut commands: Commands,
|
|
|
|
|
) {
|
|
|
|
|
if query.iter().len() == 0 || *state.get() != TutorialState::None {
|
|
|
|
|
info!("Intro dissolve is done!");
|
|
|
|
|
if query.iter().len() == 0 && *state.get() == TutorialState::None && board.current_epoch() <= 1 {
|
|
|
|
|
info!("Starting intro tutorial!");
|
|
|
|
|
next_state.set(TutorialState::Intro);
|
|
|
|
|
commands.insert_resource(TutorialStarted);
|
|
|
|
|
}
|
|
|
|
|
|