pub struct EntityRecord { /* private fields */ }Expand description
Complete entity record stored in the contiguous GameWorld arena.
Implementations§
Source§impl EntityRecord
Optional component accessors for EntityRecord.
impl EntityRecord
Optional component accessors for EntityRecord.
Sourcepub fn body_component(&self) -> Option<RigidBody2D>
pub fn body_component(&self) -> Option<RigidBody2D>
Sourcepub fn collider_component(&self) -> Option<Collider2D>
pub fn collider_component(&self) -> Option<Collider2D>
Sourcepub fn sprite_component(&self) -> Option<Sprite2D>
pub fn sprite_component(&self) -> Option<Sprite2D>
Sourcepub fn world_bounds(&self) -> Rect
pub fn world_bounds(&self) -> Rect
Source§impl EntityRecord
impl EntityRecord
pub fn get_id(&self) -> EntityId
pub fn get_mut_id(&mut self) -> &mut EntityId
pub fn set_id(&mut self, val: EntityId) -> &mut Self
pub fn get_alive(&self) -> bool
pub fn get_mut_alive(&mut self) -> &mut bool
pub fn set_alive(&mut self, val: bool) -> &mut Self
pub fn get_tag(&self) -> EntityTag
pub fn get_mut_tag(&mut self) -> &mut EntityTag
pub fn set_tag(&mut self, val: EntityTag) -> &mut Self
pub fn get_transform(&self) -> EntityTransform
pub fn get_mut_transform(&mut self) -> &mut EntityTransform
pub fn set_transform(&mut self, val: EntityTransform) -> &mut Self
pub fn get_velocity(&self) -> Velocity2D
pub fn get_mut_velocity(&mut self) -> &mut Velocity2D
pub fn set_velocity(&mut self, val: Velocity2D) -> &mut Self
pub fn get_mut_body(&mut self) -> &mut Option<RigidBody2D>
pub fn set_body(&mut self, val: Option<RigidBody2D>) -> &mut Self
pub fn get_mut_collider(&mut self) -> &mut Option<Collider2D>
pub fn set_collider(&mut self, val: Option<Collider2D>) -> &mut Self
pub fn get_mut_sprite(&mut self) -> &mut Option<Sprite2D>
pub fn set_sprite(&mut self, val: Option<Sprite2D>) -> &mut Self
pub fn get_health(&self) -> f32
pub fn get_mut_health(&mut self) -> &mut f32
pub fn set_health(&mut self, val: f32) -> &mut Self
pub fn get_max_health(&self) -> f32
pub fn get_mut_max_health(&mut self) -> &mut f32
pub fn set_max_health(&mut self, val: f32) -> &mut Self
pub fn get_mut_ttl_secs(&mut self) -> &mut Option<f32>
pub fn set_ttl_secs(&mut self, val: Option<f32>) -> &mut Self
pub fn get_user_data(&self) -> u64
pub fn get_mut_user_data(&mut self) -> &mut u64
pub fn set_user_data(&mut self, val: u64) -> &mut Self
Trait Implementations§
Source§impl Clone for EntityRecord
impl Clone for EntityRecord
Source§impl Debug for EntityRecord
impl Debug for EntityRecord
Source§impl PartialEq for EntityRecord
impl PartialEq for EntityRecord
impl StructuralPartialEq for EntityRecord
Auto Trait Implementations§
impl Forget for EntityRecord
impl Freeze for EntityRecord
impl Move for EntityRecord
impl RefUnwindSafe for EntityRecord
impl Send for EntityRecord
impl Sync for EntityRecord
impl Unpin for EntityRecord
impl UnsafeUnpin for EntityRecord
impl UnwindSafe for EntityRecord
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