pub struct EntityManager { /* private fields */ }Expand description
Entity manager
Implementations§
Source§impl EntityManager
impl EntityManager
Sourcepub fn create_entity(&mut self) -> u32
pub fn create_entity(&mut self) -> u32
Creates entity and returns it’s id
Sourcepub fn create_n_entities(&mut self, n: i32) -> Vec<u32>
pub fn create_n_entities(&mut self, n: i32) -> Vec<u32>
Create multiple entities and return the id’s inside a vector
Sourcepub fn mark_remove(&mut self, entity: u32)
pub fn mark_remove(&mut self, entity: u32)
Mark entity for removal
Sourcepub fn remove_entity(&mut self, entity: u32)
pub fn remove_entity(&mut self, entity: u32)
Remove entity
Sourcepub fn remove_entities(&mut self)
pub fn remove_entities(&mut self)
Remove all entities that are marked as remove
Trait Implementations§
Source§impl Clone for EntityManager
impl Clone for EntityManager
Source§fn clone(&self) -> EntityManager
fn clone(&self) -> EntityManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EntityManager
impl RefUnwindSafe for EntityManager
impl Send for EntityManager
impl Sync for EntityManager
impl Unpin for EntityManager
impl UnwindSafe for EntityManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more