pub enum Layer {
TileLayer {
size: UVec2,
position: IVec2,
offset: IVec2,
parallax: Vec2,
color: Vec4,
visible: bool,
data: Vec<u32>,
},
ObjectLayer {
draworder_index: bool,
objects: Vec<Object>,
offset: IVec2,
parallax: Vec2,
color: Vec4,
visible: bool,
},
ImageLayer {
image: Texture,
offset: IVec2,
parallax: Vec2,
color: Vec4,
visible: bool,
},
Group {
layers: Vec<Layer>,
},
}Expand description
A layer
Variants§
TileLayer
A layer densely populated with tiles.
Fields
ObjectLayer
A layer populated with individual objects.
Fields
ImageLayer
A layer populated with a single big image, like a background.
Fields
Group
A set of layers grouped together, mainly for convenience in the map editor.
Auto Trait Implementations§
impl Freeze for Layer
impl RefUnwindSafe for Layer
impl Send for Layer
impl Sync for Layer
impl Unpin for Layer
impl UnwindSafe for Layer
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> 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