pub struct MapEditor {Show 25 fields
pub map: TileMap,
pub layers: Vec<MapLayer>,
pub db: TileDatabase,
pub undo_stack: MapUndoStack,
pub brush: BrushState,
pub clipboard: Clipboard,
pub selection: SelectionRect,
pub rooms: RoomGraph,
pub encounter_zones: Vec<EncounterZone>,
pub patrol_paths: Vec<PatrolPath>,
pub event_zones: Vec<EventZone>,
pub scripted_sequences: Vec<ScriptedSequence>,
pub lights: Vec<PointLight>,
pub minimap: MinimapData,
pub mode: MapEditorMode,
pub current_layer: usize,
pub rng: MapRng,
pub pending_actions: Vec<MapEditAction>,
pub grid_visible: bool,
pub show_collision: bool,
pub show_entities: bool,
pub show_lighting: bool,
pub show_patrol_paths: bool,
pub show_encounter_zones: bool,
pub show_minimap: bool,
}Fields§
§map: TileMap§layers: Vec<MapLayer>§db: TileDatabase§undo_stack: MapUndoStack§brush: BrushState§clipboard: Clipboard§selection: SelectionRect§rooms: RoomGraph§encounter_zones: Vec<EncounterZone>§patrol_paths: Vec<PatrolPath>§event_zones: Vec<EventZone>§scripted_sequences: Vec<ScriptedSequence>§lights: Vec<PointLight>§minimap: MinimapData§mode: MapEditorMode§current_layer: usize§rng: MapRng§pending_actions: Vec<MapEditAction>§grid_visible: bool§show_collision: bool§show_entities: bool§show_lighting: bool§show_patrol_paths: bool§show_encounter_zones: bool§show_minimap: boolImplementations§
Source§impl MapEditor
impl MapEditor
pub fn new( width: usize, height: usize, tile_width: u32, tile_height: u32, ) -> Self
pub fn undo(&mut self)
pub fn total_walkable_tiles(&self) -> usize
pub fn start_stroke(&mut self, _x: usize, _y: usize)
pub fn paint_tile(&mut self, x: usize, y: usize)
pub fn end_stroke(&mut self)
pub fn layers(&self) -> &Vec<MapLayer>
pub fn paint_tile_at(&mut self, x: usize, y: usize)
pub fn total_solid_tiles(&self) -> usize
pub fn serialize(&self) -> Vec<u8> ⓘ
pub fn deserialize_into(&mut self, data: &[u8]) -> bool
pub fn generate_dungeon(&mut self, _depth: usize, _min_rooms: usize, _seed: u64)
pub fn bake_lights(&mut self)
pub fn rebuild_minimap(&mut self)
pub fn undo_last(&mut self)
Auto Trait Implementations§
impl Freeze for MapEditor
impl RefUnwindSafe for MapEditor
impl Send for MapEditor
impl Sync for MapEditor
impl Unpin for MapEditor
impl UnsafeUnpin for MapEditor
impl UnwindSafe for MapEditor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.