pub struct BeatmapAttributesBuilder { /* private fields */ }Expand description
A builder for BeatmapAttributes.
Implementations§
Source§impl BeatmapAttributesBuilder
impl BeatmapAttributesBuilder
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Create a new BeatmapAttributesBuilder.
The mode will be GameMode::Osu and attributes are set to 5.0.
Sourcepub const fn map(&mut self, map: &Beatmap) -> &mut Self
pub const fn map(&mut self, map: &Beatmap) -> &mut Self
Use the given Beatmap’s attributes, mode, and convert status.
Sourcepub const fn ar(&mut self, ar: f32, fixed: bool) -> &mut Self
pub const fn ar(&mut self, ar: f32, fixed: bool) -> &mut Self
Specify the approach rate.
fixed determines if the given value should be used before or after accounting for mods, e.g. on true the value will be used as-is and on false it will be modified based on the mods.
Sourcepub const fn od(&mut self, od: f32, fixed: bool) -> &mut Self
pub const fn od(&mut self, od: f32, fixed: bool) -> &mut Self
Specify the overall difficulty.
fixed determines if the given value should be used before or after accounting for mods, e.g. on true the value will be used as-is and on false it will be modified based on the mods.
Sourcepub const fn cs(&mut self, cs: f32, fixed: bool) -> &mut Self
pub const fn cs(&mut self, cs: f32, fixed: bool) -> &mut Self
Specify the circle size.
fixed determines if the given value should be used before or after accounting for mods, e.g. on true the value will be used as-is and on false it will be modified based on the mods.
Sourcepub const fn hp(&mut self, hp: f32, fixed: bool) -> &mut Self
pub const fn hp(&mut self, hp: f32, fixed: bool) -> &mut Self
Specify the drain rate.
fixed determines if the given value should be used before or after accounting for mods, e.g. on true the value will be used as-is and on false it will be modified based on the mods.
Sourcepub fn mods(&mut self, mods: impl Into<GameMods>) -> &mut Self
pub fn mods(&mut self, mods: impl Into<GameMods>) -> &mut Self
Specify mods.
Accepted types are
Sourcepub const fn clock_rate(&mut self, clock_rate: f64) -> &mut Self
pub const fn clock_rate(&mut self, clock_rate: f64) -> &mut Self
Specify a custom clock rate.
Sourcepub const fn mode(&mut self, mode: GameMode, is_convert: bool) -> &mut Self
pub const fn mode(&mut self, mode: GameMode, is_convert: bool) -> &mut Self
Specify a GameMode and whether it’s a converted map.
Sourcepub fn difficulty(&mut self, difficulty: &Difficulty) -> &mut Self
pub fn difficulty(&mut self, difficulty: &Difficulty) -> &mut Self
Specify all settings through Difficulty.
Sourcepub fn build(&self) -> BeatmapAttributes
pub fn build(&self) -> BeatmapAttributes
Calculate the BeatmapAttributes.
Trait Implementations§
Source§impl Clone for BeatmapAttributesBuilder
impl Clone for BeatmapAttributesBuilder
Source§fn clone(&self) -> BeatmapAttributesBuilder
fn clone(&self) -> BeatmapAttributesBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BeatmapAttributesBuilder
impl Debug for BeatmapAttributesBuilder
Source§impl Default for BeatmapAttributesBuilder
impl Default for BeatmapAttributesBuilder
Source§impl From<&Beatmap> for BeatmapAttributesBuilder
impl From<&Beatmap> for BeatmapAttributesBuilder
Source§impl From<&Difficulty> for BeatmapAttributesBuilder
impl From<&Difficulty> for BeatmapAttributesBuilder
Source§fn from(difficulty: &Difficulty) -> Self
fn from(difficulty: &Difficulty) -> Self
Source§impl PartialEq for BeatmapAttributesBuilder
impl PartialEq for BeatmapAttributesBuilder
Source§fn eq(&self, other: &BeatmapAttributesBuilder) -> bool
fn eq(&self, other: &BeatmapAttributesBuilder) -> bool
self and other values to be equal, and is used by ==.