Move input_manager and camera as resource

This commit is contained in:
Florian RICHER 2025-06-12 19:36:49 +02:00
parent 6ba61e040e
commit 07056fc0ce
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
5 changed files with 72 additions and 68 deletions

View file

@ -141,18 +141,6 @@ impl WindowContext {
f(&mut gui)
}
/// Méthode utilitaire pour accéder à l'input manager de manière thread-safe
pub fn with_input_manager<T, F>(&self, f: F) -> T
where
F: FnOnce(&InputManager) -> T,
{
let input_manager = self
.input_manager
.read()
.expect("Failed to lock input_manager");
f(&input_manager)
}
/// Méthode utilitaire pour accéder au timer de manière thread-safe
pub fn with_timer<T, F>(&self, f: F) -> T
where