|
|
|
|
@ -10,6 +10,7 @@ impl Plugin for EditorPlugin {
|
|
|
|
|
app.add_systems(Update, toggle_editor.run_if(input_just_pressed(KeyCode::F3)));
|
|
|
|
|
app.add_systems(OnEnter(EditorState::Open), open_editor);
|
|
|
|
|
app.add_systems(OnExit(EditorState::Open), close_editor);
|
|
|
|
|
app.add_systems(Update, origin_directions.run_if(in_state(EditorState::Open)));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -89,4 +90,10 @@ fn toggle_editor(
|
|
|
|
|
} else {
|
|
|
|
|
*catch = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn origin_directions(
|
|
|
|
|
mut gizmos: Gizmos
|
|
|
|
|
) {
|
|
|
|
|
gizmos.arrow(Vec3::ZERO, Vec3::ONE, Color::GREEN);
|
|
|
|
|
}
|