pub struct ProgressionCurve {
pub baseline_display: u16,
pub xp_base: f64,
pub xp_growth: f64,
}Expand description
Tunable progression curve (defaults match flatland_settings::ProgressionSettings).
Fields§
§baseline_display: u16§xp_base: f64§xp_growth: f64Implementations§
Source§impl ProgressionCurve
impl ProgressionCurve
pub fn xp_for_display_level(&self, display: f64) -> f64
pub fn display_from_xp(&self, xp: f64) -> u16
pub fn skill_internal_from_xp(&self, xp: f64) -> u16
pub fn primary_progress(&self, xp: f64) -> LevelProgress
pub fn skill_progress(&self, xp: f64) -> LevelProgress
pub fn band_progress( &self, xp: f64, current_level: u16, next_level: u16, ) -> LevelProgress
Trait Implementations§
Source§impl Clone for ProgressionCurve
impl Clone for ProgressionCurve
Source§fn clone(&self) -> ProgressionCurve
fn clone(&self) -> ProgressionCurve
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ProgressionCurve
Source§impl Debug for ProgressionCurve
impl Debug for ProgressionCurve
Source§impl Default for ProgressionCurve
impl Default for ProgressionCurve
Source§impl PartialEq for ProgressionCurve
impl PartialEq for ProgressionCurve
impl StructuralPartialEq for ProgressionCurve
Auto Trait Implementations§
impl Freeze for ProgressionCurve
impl RefUnwindSafe for ProgressionCurve
impl Send for ProgressionCurve
impl Sync for ProgressionCurve
impl Unpin for ProgressionCurve
impl UnsafeUnpin for ProgressionCurve
impl UnwindSafe for ProgressionCurve
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