pub enum ObjectType {
Ball,
Domino,
Ramp,
Lever,
Pulley,
Spring,
Fan,
Magnet,
Bucket,
Sensor,
}Expand description
Object types available in the sandbox
Variants§
Ball
Dynamic ball - rolls and bounces
Domino
Dynamic domino - falls and triggers chain reactions
Ramp
Static ramp - redirects objects
Lever
Hinged lever - pivots around fulcrum
Pulley
Constraint pulley - transfers force
Spring
Constraint spring - stores elastic energy
Fan
Force field fan - applies directional force
Magnet
Force field magnet - attracts/repels
Bucket
Trigger bucket - detects objects (win condition)
Sensor
Trigger sensor - detects proximity
Implementations§
Source§impl ObjectType
impl ObjectType
Sourcepub const fn is_dynamic(&self) -> bool
pub const fn is_dynamic(&self) -> bool
Is this object type dynamic (affected by physics)?
Sourcepub const fn is_trigger(&self) -> bool
pub const fn is_trigger(&self) -> bool
Is this object type a trigger (detects but doesn’t collide)?
Sourcepub const fn is_constraint(&self) -> bool
pub const fn is_constraint(&self) -> bool
Is this object type a constraint (connects other objects)?
Trait Implementations§
Source§impl Clone for ObjectType
impl Clone for ObjectType
Source§fn clone(&self) -> ObjectType
fn clone(&self) -> ObjectType
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 moreSource§impl Debug for ObjectType
impl Debug for ObjectType
Source§impl<'de> Deserialize<'de> for ObjectType
impl<'de> Deserialize<'de> for ObjectType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ObjectType
impl Hash for ObjectType
Source§impl PartialEq for ObjectType
impl PartialEq for ObjectType
Source§impl Serialize for ObjectType
impl Serialize for ObjectType
impl Copy for ObjectType
impl Eq for ObjectType
impl StructuralPartialEq for ObjectType
Auto Trait Implementations§
impl Freeze for ObjectType
impl RefUnwindSafe for ObjectType
impl Send for ObjectType
impl Sync for ObjectType
impl Unpin for ObjectType
impl UnwindSafe for ObjectType
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