pub struct EncounterZoneRecord {
pub zone_id: u32,
pub bounds: (i32, i32, i32, i32),
pub trigger_type: EncounterTriggerType,
pub encounter_groups: Vec<EncounterGroup>,
pub respawn_time_s: f32,
pub last_cleared_time: f32,
pub difficulty_scale: f32,
}Fields§
§zone_id: u32§bounds: (i32, i32, i32, i32)§trigger_type: EncounterTriggerType§encounter_groups: Vec<EncounterGroup>§respawn_time_s: f32§last_cleared_time: f32§difficulty_scale: f32Implementations§
Source§impl EncounterZoneRecord
impl EncounterZoneRecord
pub fn new(id: u32, x1: i32, y1: i32, x2: i32, y2: i32) -> Self
pub fn contains(&self, x: i32, y: i32) -> bool
pub fn add_group(&mut self, group: EncounterGroup)
pub fn can_respawn(&self, current_time: f32) -> bool
pub fn total_enemy_count(&self) -> usize
pub fn total_xp_reward(&self) -> u32
Trait Implementations§
Source§impl Clone for EncounterZoneRecord
impl Clone for EncounterZoneRecord
Auto Trait Implementations§
impl Freeze for EncounterZoneRecord
impl RefUnwindSafe for EncounterZoneRecord
impl Send for EncounterZoneRecord
impl Sync for EncounterZoneRecord
impl Unpin for EncounterZoneRecord
impl UnsafeUnpin for EncounterZoneRecord
impl UnwindSafe for EncounterZoneRecord
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.