mirror of
https://github.com/lisk77/comet.git
synced 2025-10-23 21:38:50 +00:00
fix: changed the input type of the query functions from ComponentSet to Vec<TypeId>
This commit is contained in:
parent
643c5caf0e
commit
ff475f1775
4 changed files with 16 additions and 16 deletions
|
|
@ -1,7 +1,6 @@
|
|||
use std::any::{type_name, Any};
|
||||
use std::any::{type_name, Any, TypeId};
|
||||
use std::sync::Arc;
|
||||
use comet_ecs::{Camera2D, Color, Component, Entity, Render2D, Scene, Text, Transform2D, Transform3D};
|
||||
|
||||
use winit::{
|
||||
event::*,
|
||||
event_loop::EventLoop,
|
||||
|
|
@ -174,11 +173,11 @@ impl App {
|
|||
self.scene.get_component_mut::<C>(entity_id)
|
||||
}
|
||||
|
||||
pub fn get_entities_with(&self, components: ComponentSet) -> Vec<usize> {
|
||||
pub fn get_entities_with(&self, components: Vec<TypeId>) -> Vec<usize> {
|
||||
self.scene.get_entities_with(components)
|
||||
}
|
||||
|
||||
pub fn delete_entities_with(&mut self, components: ComponentSet) {
|
||||
pub fn delete_entities_with(&mut self, components: Vec<TypeId>) {
|
||||
self.scene.delete_entities_with(components)
|
||||
}
|
||||
|
||||
|
|
@ -283,4 +282,4 @@ impl App {
|
|||
|
||||
info!("Shutting down {}!", self.title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue