Struct libosu::HitObject [−][src]
pub struct HitObject { pub pos: Point<i32>, pub start_time: TimeLocation, pub kind: HitObjectKind, pub new_combo: bool, pub timing_point: Option<TimingPoint>, pub skip_color: i32, pub hitsound: Hitsound, }
Represents a single hit object.
Fields
pos: Point<i32>
The position on the map at which this hit object is located (head for sliders).
start_time: TimeLocation
When this hit object occurs during the map.
kind: HitObjectKind
The kind of HitObject this represents (circle, slider, spinner).
new_combo: bool
Whether or not this object begins a new combo.
timing_point: Option<TimingPoint>
Reference to the timing point under which this HitObject belongs.
skip_color: i32
The number of combo colors to skip
hitsound: Hitsound
The hitsound attached to this hit object.
Methods
impl HitObject
[src]
impl HitObject
pub fn set_hitsound(&mut self, hitsound: &Hitsound)
[src]
pub fn set_hitsound(&mut self, hitsound: &Hitsound)
Replaces the hitsound on this hitobject.
impl HitObject
[src]
impl HitObject
pub fn from_osz(
input: impl AsRef<str>,
parent: &Beatmap
) -> Result<HitObject, Error>
[src]
pub fn from_osz(
input: impl AsRef<str>,
parent: &Beatmap
) -> Result<HitObject, Error>
Creates a HitObject from the *.osz format
pub fn as_osz(&self) -> Result<String, Error>
[src]
pub fn as_osz(&self) -> Result<String, Error>
Serializes this HitObject into the *.osz format.
Trait Implementations
impl Clone for HitObject
[src]
impl Clone for HitObject
fn clone(&self) -> HitObject
[src]
fn clone(&self) -> HitObject
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for HitObject
[src]
impl Debug for HitObject
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Serialize for HitObject
[src]
impl Serialize for HitObject
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Ord for HitObject
[src]
impl Ord for HitObject
fn cmp(&self, other: &Self) -> Ordering
[src]
fn cmp(&self, other: &Self) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialOrd for HitObject
[src]
impl PartialOrd for HitObject
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Eq for HitObject
[src]
impl Eq for HitObject
impl PartialEq for HitObject
[src]
impl PartialEq for HitObject