pub struct DifficultyParams {
pub damage_scale: f32,
pub enemy_health_scale: f32,
pub enemy_speed_scale: f32,
pub resource_scale: f32,
pub xp_scale: f32,
}Fields§
§damage_scale: f32§enemy_health_scale: f32§enemy_speed_scale: f32§resource_scale: f32§xp_scale: f32Implementations§
Source§impl DifficultyParams
impl DifficultyParams
pub fn scale_damage(&self, base: f32) -> f32
pub fn scale_enemy_health(&self, base: f32) -> f32
pub fn scale_enemy_speed(&self, base: f32) -> f32
pub fn scale_resource(&self, base: f32) -> f32
pub fn scale_xp(&self, base: f32) -> f32
Trait Implementations§
Source§impl Clone for DifficultyParams
impl Clone for DifficultyParams
Source§fn clone(&self) -> DifficultyParams
fn clone(&self) -> DifficultyParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DifficultyParams
impl Debug for DifficultyParams
Auto Trait Implementations§
impl Freeze for DifficultyParams
impl RefUnwindSafe for DifficultyParams
impl Send for DifficultyParams
impl Sync for DifficultyParams
impl Unpin for DifficultyParams
impl UnsafeUnpin for DifficultyParams
impl UnwindSafe for DifficultyParams
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<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.