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