pub struct MapConnection<M: MapTrait> {
pub direction: String,
pub map: M,
pub offset: i8,
}Expand description
Describes a connection between two maps on the overworld.
Connections allow seamless scrolling between adjacent maps without a fade transition. The engine uses this to preload the connected map’s block data when the player approaches the border.
Fields§
§direction: StringThe direction of the connection: “north”, “south”, “east”, or “west”.
map: MThe connected map.
offset: i8The offset (in tiles) along the connection border.
Positive values shift the connected map to the right (horizontal) or down (vertical); negative values shift left/up.
Trait Implementations§
Auto Trait Implementations§
impl<M> Freeze for MapConnection<M>where
M: Freeze,
impl<M> RefUnwindSafe for MapConnection<M>where
M: RefUnwindSafe,
impl<M> Send for MapConnection<M>where
M: Send,
impl<M> Sync for MapConnection<M>where
M: Sync,
impl<M> Unpin for MapConnection<M>where
M: Unpin,
impl<M> UnsafeUnpin for MapConnection<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for MapConnection<M>where
M: UnwindSafe,
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