mirror of
https://github.com/lisk77/comet.git
synced 2025-12-12 17:18:50 +00:00
chore(all): fix warnings
This commit is contained in:
parent
c7f0412eff
commit
81bc1cb790
14 changed files with 471 additions and 513 deletions
|
|
@ -1,5 +1,4 @@
|
|||
use comet_ecs::{Camera2D, Transform2D};
|
||||
use comet_log::fatal;
|
||||
use comet_math::{m4, v2, v3};
|
||||
|
||||
pub struct CameraManager {
|
||||
|
|
@ -15,16 +14,6 @@ impl CameraManager {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn set_cameras(&mut self, cameras: Vec<RenderCamera>) {
|
||||
self.cameras = cameras
|
||||
}
|
||||
|
||||
pub fn set_active(&mut self, active: usize) {
|
||||
if active >= self.cameras.len() {
|
||||
fatal!("Active camera index is out of range of the RenderCamera array!")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_camera(&self) -> &RenderCamera {
|
||||
self.cameras.get(self.active_camera).unwrap()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue