expose BeatmapExt methods for mode-specific objects (#20)

* expose osu hitobjects

* added pub method to create osu objects

* expose mania objects

* added some derived traits to public types

* expose taiko objects

* expose catch objects

* add documentation

* fix documentation
This commit is contained in:
MaxOhn
2023-01-28 04:33:05 +01:00
committed by GitHub
parent cdb0bbb8f4
commit fb36edd132
11 changed files with 294 additions and 112 deletions
+9 -4
View File
@@ -22,10 +22,15 @@ impl<'a> ObjectParameters<'a> {
}
}
pub(crate) struct ManiaObject {
pub(crate) start_time: f64,
pub(crate) end_time: f64,
pub(crate) column: usize,
/// A [`HitObject`] that was processed for the osu!mania gamemode.
#[derive(Clone, Debug, PartialEq)]
pub struct ManiaObject {
/// Start time of the object.
pub start_time: f64,
/// Endtime of the object.
pub end_time: f64,
/// Column of the object.
pub column: usize,
}
impl ManiaObject {
+2 -3
View File
@@ -9,13 +9,12 @@ use std::borrow::Cow;
use crate::{beatmap::BeatmapHitWindows, util::FloatExt, Beatmap, GameMode, Mods, OsuStars};
pub use self::{gradual_difficulty::*, gradual_performance::*, pp::*};
pub use self::{gradual_difficulty::*, gradual_performance::*, mania_object::ManiaObject, pp::*};
pub(crate) use self::mania_object::ManiaObject;
pub(crate) use self::mania_object::ObjectParameters;
use self::{
difficulty_object::ManiaDifficultyObject,
mania_object::ObjectParameters,
skills::{Skill, Strain},
};