Struct libosu::beatmap::Difficulty
source · [−]pub struct Difficulty {
pub hp_drain_rate: f32,
pub circle_size: f32,
pub overall_difficulty: f32,
pub approach_rate: f32,
pub slider_multiplier: f64,
pub slider_tick_rate: f64,
}
Expand description
Difficulty settings defined by the map.
Fields
hp_drain_rate: f32
HP Drain Rate
The wiki doesn’t have a solid definition of this field yet.
circle_size: f32
Circle Size
This is a value between 0 and 10 representing how big circles should appear on screen.
In osu!mania, this actually defines the number of columns (keys).
overall_difficulty: f32
Overall Difficulty
approach_rate: f32
Approach Rate
slider_multiplier: f64
Slider Multiplier
slider_tick_rate: f64
Slider tick rate
Implementations
sourceimpl Difficulty
impl Difficulty
sourcepub fn circle_size_osupx(&self) -> f32
pub fn circle_size_osupx(&self) -> f32
Calculates the size of a circle in OsuPixels, which is how big the circle appears on a 640x480 screen.
The formula for this can be found here and is equal to 54.4 - 4.48 * cs
.
sourcepub fn approach_preempt(&self) -> Millis
pub fn approach_preempt(&self) -> Millis
Calculates the duration of time (in milliseconds) before the hit object’s point of impact at which the object should begin fading in.
The formula for this can be found here and is a piecewise function:
- AR < 5: preempt = 1200ms + 600ms * (5 - AR) / 5
- AR = 5: preempt = 1200ms
- AR > 5: preempt = 1200ms - 750ms * (AR - 5) / 5
sourcepub fn approach_fade_time(&self) -> Millis
pub fn approach_fade_time(&self) -> Millis
Calculates the duration of time (in milliseconds) it takes the hitobject to fade in completely to 100% opacity.
The formula for this can be found here and is a piecewise function:
- AR < 5: fade_in = 800ms + 400ms * (5 - AR) / 5
- AR = 5: fade_in = 800ms
- AR > 5: fade_in = 800ms - 500ms * (AR - 5) / 5
Trait Implementations
sourceimpl Clone for Difficulty
impl Clone for Difficulty
sourcefn clone(&self) -> Difficulty
fn clone(&self) -> Difficulty
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Difficulty
impl Debug for Difficulty
sourceimpl Default for Difficulty
impl Default for Difficulty
sourcefn default() -> Difficulty
fn default() -> Difficulty
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for Difficulty
impl<'de> Deserialize<'de> for Difficulty
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<Difficulty> for Difficulty
impl PartialEq<Difficulty> for Difficulty
sourcefn eq(&self, other: &Difficulty) -> bool
fn eq(&self, other: &Difficulty) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Difficulty) -> bool
fn ne(&self, other: &Difficulty) -> bool
This method tests for !=
.
sourceimpl Serialize for Difficulty
impl Serialize for Difficulty
impl StructuralPartialEq for Difficulty
Auto Trait Implementations
impl RefUnwindSafe for Difficulty
impl Send for Difficulty
impl Sync for Difficulty
impl Unpin for Difficulty
impl UnwindSafe for Difficulty
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more