refactor tasks

This commit is contained in:
galister
2025-12-10 17:12:26 +09:00
parent c6aa84f6cb
commit 01fea96545
16 changed files with 255 additions and 259 deletions

View File

@@ -6,7 +6,9 @@ use ovr_overlay::{
};
use crate::{
backend::input::InputState, state::AppState, windowing::manager::OverlayWindowManager,
backend::{input::InputState, task::PlayspaceTask},
state::AppState,
windowing::manager::OverlayWindowManager,
};
use super::{helpers::Affine3AConvert, overlay::OpenVrOverlayData};
@@ -32,6 +34,22 @@ impl PlayspaceMover {
}
}
pub fn handle_task(
&mut self,
app: &AppState,
chaperone_mgr: &mut ChaperoneSetupManager,
task: PlayspaceTask,
) {
match task {
PlayspaceTask::FixFloor => {
self.fix_floor(chaperone_mgr, &app.input_state);
}
PlayspaceTask::ResetPlayspace => {
self.reset_offset(chaperone_mgr, &app.input_state);
}
}
}
#[allow(clippy::too_many_lines, clippy::cognitive_complexity)]
pub fn update(
&mut self,