pub struct Object {
pub id: u32,
pub properties: HashMap<String, Property>,
pub tile: Option<u32>,
pub shape: Shape,
pub name: String,
pub ty: String,
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
pub rotation: f32,
pub visible: bool,
}
Expand description
Object description
Fields§
§id: u32
Unique id for the object.
properties: HashMap<String, Property>
Custom properties defined on the object.
tile: Option<u32>
Global tile id defining an optional sprite for this object.
shape: Shape
The shape of this object.
name: String
Custom name for the object
ty: String
Custom type for the object
x: f32
left X coordinate in pixels where the object is positioned.
y: f32
bottom Y coordinate in pixels where the object is positioned.
width: f32
Width in pixels of the object.
height: f32
Height in pixels of the object.
rotation: f32
Rotation around (x,y) in degrees of the object.
visible: bool
Whether the object is visible. Invisible objects have their Draw
component set to invisible.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more