mirror of
https://github.com/lisk77/comet.git
synced 2025-10-24 13:58:49 +00:00
feat: implemented a Camera2D component that works with the Renderer2D
Renders with only one camera (the first by ID) rn but should work
This commit is contained in:
parent
e6df3dba91
commit
8b439cb0e8
4 changed files with 178 additions and 45 deletions
|
|
@ -24,6 +24,7 @@ use winit_input_helper::WinitInputHelper;
|
|||
use comet_input::input_handler::InputHandler;
|
||||
use comet_input::keyboard::Key;
|
||||
use comet_renderer::renderer::Renderer;
|
||||
use comet_structs::ComponentSet;
|
||||
use crate::GameState;
|
||||
|
||||
pub enum ApplicationType {
|
||||
|
|
@ -187,6 +188,10 @@ impl App {
|
|||
self.world.get_component_mut::<C>(entity_id)
|
||||
}
|
||||
|
||||
pub fn get_entities_with(&self, components: ComponentSet) -> Vec<usize> {
|
||||
self.world.get_entities_with(components)
|
||||
}
|
||||
|
||||
pub fn quit(&mut self) {
|
||||
self.should_quit = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue