Struct entmet_lib::entities::entity::Interaction
source · pub struct Interaction {
pub width: f32,
pub height: f32,
pub responsive: bool,
/* private fields */
}Expand description
An instance of an interaction
Fields§
§width: f32The width
height: f32The height
responsive: boolWhether it can be attacked/interacted with or not
Implementations§
source§impl Interaction
impl Interaction
sourcepub fn new(
width: f32,
height: f32,
responsive: bool,
entity: Option<Entity>
) -> Self
pub fn new( width: f32, height: f32, responsive: bool, entity: Option<Entity> ) -> Self
Function to create a new instance of an Interaction
§Arguments
width - The width of the interaction
height - The height of the interaction
responsive - Wether it is interactable or not
entity - Optional Entity, if None the default entity is used
Trait Implementations§
source§impl Default for Interaction
impl Default for Interaction
source§impl Deref for Interaction
impl Deref for Interaction
Auto Trait Implementations§
impl Freeze for Interaction
impl RefUnwindSafe for Interaction
impl Send for Interaction
impl Sync for Interaction
impl Unpin for Interaction
impl UnwindSafe for Interaction
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