Struct yy_typings::object_yy::Object
source · [−]pub struct Object {Show 23 fields
pub sprite_id: Option<FilesystemPath>,
pub solid: bool,
pub visible: bool,
pub sprite_mask_id: Option<FilesystemPath>,
pub persistent: bool,
pub parent_object_id: Option<FilesystemPath>,
pub physics_object: bool,
pub physics_sensor: bool,
pub physics_shape: PhysicsShape,
pub physics_group: usize,
pub physics_density: f64,
pub physics_restitution: f64,
pub physics_linear_damping: f64,
pub physics_angular_damping: f64,
pub physics_friction: f64,
pub physics_start_awake: bool,
pub physics_kinematic: bool,
pub physics_shape_points: Vec<PhysicsVec2>,
pub event_list: Vec<ObjectEvent>,
pub properties: Vec<ObjectProperty>,
pub overridden_properties: Vec<ObjectOverrideProperty>,
pub resource_data: ResourceData,
pub resource_type: ConstGmObject,
}
Fields
sprite_id: Option<FilesystemPath>
The Id of the Sprite being used for this object.
solid: bool
If the object is marked as solid for the collision system.
visible: bool
If the object is visible.
sprite_mask_id: Option<FilesystemPath>
The Id used for the Collision Mask, if not the SpriteId.
persistent: bool
If the object is “persistent”, meaning if Gms2 will keep the object between room change events.
parent_object_id: Option<FilesystemPath>
The id of the parent object for the Inhertance in Gms2.
physics_object: bool
Is this a physics object?
physics_sensor: bool
Enabled if the objects is a physics sensor.
physics_shape: PhysicsShape
The shape of the physics, which is needed to understand the shape points.
physics_group: usize
What numerical group it belongs to. 0 is a special non-group value.
physics_density: f64
The density.
physics_restitution: f64
The restitution.
physics_linear_damping: f64
The linear damping.
physics_angular_damping: f64
The angular damping set.
physics_friction: f64
The friction set.
physics_start_awake: bool
Whether this object should start awake or not.
physics_kinematic: bool
Whether this physics object is kinematic or not.
physics_shape_points: Vec<PhysicsVec2>
The shape points of the physics shape.
event_list: Vec<ObjectEvent>
properties: Vec<ObjectProperty>
The properties which were made in this object directly.
overridden_properties: Vec<ObjectOverrideProperty>
The properties which were made in a parent object AND overriden. If the
parent object’s properties have not been overriden, then they will
not appear anywhere in this object’s yy
files and must
be found recursively.
resource_data: ResourceData
Common resource data.
resource_type: ConstGmObject
Const id tag of the object, given by Gms2.
Trait Implementations
sourceimpl Default for Object
impl Default for Object
sourcefn default() -> Self
fn default() -> Self
Return Object { sprite_id: Default::default(), solid: Default::default(), visible: Default::default(), sprite_mask_id: Default::default(), persistent: Default::default(), parent_object_id: Default::default(), physics_object: Default::default(), physics_sensor: Default::default(), physics_shape: Default::default(), physics_group: Default::default(), physics_density: Default::default(), physics_restitution: Default::default(), physics_linear_damping: Default::default(), physics_angular_damping: Default::default(), physics_friction: Default::default(), physics_start_awake: Default::default(), physics_kinematic: Default::default(), physics_shape_points: Default::default(), event_list: Default::default(), properties: Default::default(), overridden_properties: Default::default(), resource_data: Default::default(), resource_type: Default::default() }
sourceimpl<'de> Deserialize<'de> for Object
impl<'de> Deserialize<'de> for Object
sourcefn 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
sourceimpl PartialOrd<Object> for Object
impl PartialOrd<Object> for Object
sourcefn partial_cmp(&self, other: &Object) -> Option<Ordering>
fn partial_cmp(&self, other: &Object) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl StructuralPartialEq for Object
Auto Trait Implementations
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more