pub struct MapObject {
pub id: u32,
pub name: String,
pub object_type: String,
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
pub properties: HashMap<String, String>,
}Expand description
A single object in an object layer.
Objects represent positioned entities such as spawn points, collision regions, or trigger zones.
Fields§
§id: u32Unique ID within the map.
name: StringObject name as set in the Tiled editor.
object_type: StringObject type/class as set in the Tiled editor.
x: f32X position in pixels.
y: f32Y position in pixels.
width: f32Width in pixels.
height: f32Height in pixels.
properties: HashMap<String, String>Custom properties as string key-value pairs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MapObject
impl RefUnwindSafe for MapObject
impl Send for MapObject
impl Sync for MapObject
impl Unpin for MapObject
impl UnsafeUnpin for MapObject
impl UnwindSafe for MapObject
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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