pub struct Sensor { /* private fields */ }Expand description
A struct to represent a physics sensor object in the game world.
Implementations§
Source§impl Sensor
impl Sensor
Sourcepub fn set_enabled(&mut self, val: bool)
pub fn set_enabled(&mut self, val: bool)
Sets whether the sensor is currently enabled or not.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Gets whether the sensor is currently enabled or not.
Sourcepub fn is_sensed(&self) -> bool
pub fn is_sensed(&self) -> bool
Gets whether the sensor is currently sensing any other “Body” objects in the game world.
Sourcepub fn get_sensed_bodies(&self) -> Array
pub fn get_sensed_bodies(&self) -> Array
Gets the array of “Body” objects that are currently being sensed by the sensor.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sensor
impl RefUnwindSafe for Sensor
impl Send for Sensor
impl Sync for Sensor
impl Unpin for Sensor
impl UnwindSafe for Sensor
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